Comparisons
Comparison operators are operators that evaluate to true or false.
| Operator | Description |
|---|---|
| = | equals |
| < | less than |
| > | greater than |
| <= | less than or equal to |
| >= | greater than or equal to |
| <> | does not equal |
Syntax
SELECT <columns> FROM <table-name> WHERE <condition>;
Example
SELECT name, founded FROM Companies WHERE founded < 1980;
| Name | Founded |
|---|---|
| Walmart | 1962 |
| Disney | 1923 |