SQL Operators Reference 🎯

beginner
20 min

SQL Operators Reference 🎯

Welcome to this comprehensive guide on SQL Operators! In this tutorial, we'll explore various SQL operators that will help you manipulate and query data effectively. By the end of this lesson, you'll have a solid understanding of SQL operators, making you well-prepared for real-world projects. Let's dive in! 🌊

Table of Contents

  1. Selection Operators 1.1. SELECT 1.2. DISTINCT

  2. Comparison Operators 2.1. = 2.2. <> 2.3. > 2.4. >= 2.5. < 2.6. <= 2.7. LIKE 2.8. NOT LIKE

  3. Logical Operators 3.1. AND 3.2. OR 3.3. NOT

  4. Mathematical Operators 4.1. + 4.2. - 4.3. * 4.4. / 4.5. MOD

  5. Aggregate Functions 5.1. COUNT 5.2. SUM 5.3. AVG 5.4. MAX 5.5. MIN

  6. Joins 6.1. INNER JOIN 6.2. LEFT JOIN 6.3. RIGHT JOIN 6.4. OUTER JOIN

📝 Note:

SQL (Structured Query Language) is a powerful tool used to manage and manipulate data stored in relational databases. By learning SQL operators, you can create efficient queries, retrieve specific data, and perform various operations on it.

Selection Operators 💡

SELECT 🎯

The SELECT statement is used to select data from one or more tables.

sql
SELECT column1, column2, ... FROM table_name;

In the example above, replace column1, column2, ... with the desired columns, and table_name with the name of the table containing the data you want to retrieve.

DISTINCT 🎯

The DISTINCT keyword is used to return unique rows in a result set.

sql
SELECT DISTINCT column_name FROM table_name;

In the example above, replace column_name with the name of the column containing duplicate values, and table_name with the name of the table.


Quick Quiz
Question 1 of 1

Which SQL statement is used to select data from one or more tables?


Stay tuned for more on SQL Operators, including Comparison Operators, Logical Operators, Mathematical Operators, Aggregate Functions, and Joins! 🚀