SQL OPERATORS

There are two types of operators -:
1: Comparison Operators
2: Logical Operators




Comparision Operator:

Comparison operators are used to compare the column data with specific values in a condition and also used along with the SELECT statement to filter data based on specific conditions.


Comparison Operators Description :

= equal to
<>, != is not equal to
< less than
> greater than
>= greater than or equal to
<= less than or equal to

Example

SELECT name
FROM customers
WHERE bill > 50  ;

This will produce the following result:
NAME
Tom
Jhony
Ram




Logical Operator:

These are used to compare more than one condition to get an appropriate output.
There are three LOGICAL OPERATORS named AND, OR ,NOT


Example

SELECT name
FROM customers
WHERE bill > 50  AND AGE >40;

This will produce the following result:
NAME
Jhony
Ram

Table Name 'customers'

id

name

age

city

bill

1Tom34Paris5300
2Jhony51London 400
3Ram64Delhi20000.7
4Simon23Portland32.65

Online Execute/Compile