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
id | name | age | city | bill |
| 1 | Tom | 34 | Paris | 5300 |
| 2 | Jhony | 51 | London | 400 |
| 3 | Ram | 64 | Delhi | 20000.7 |
| 4 | Simon | 23 | Portland | 32.65 |
