SQL Operators

There are two type of Operators, namely Comparison Operators and Logical Operators. These operators are used mainly in the WHERE clause, HAVING clause to filter the data to be selected.

Logical Operators

There are five Logical Operators which are:

  1. SQL AND Operator
  2. SQL OR Operator
  3. SQL NOT Operator
  4. SQL IN Operator
  5. SQL BETWEEN Operator

Comparison Operators

Comparison operators are used to compare the column data with specific values in a condition. Comparison Operators are also used along with other SQL statements to filter data based on specific conditions.

The below table describes each comparison operator.

Comparison Operators Description
= Equal to
!= Not equal to
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to