Terminology
Operators
Operators are used to compare values. The following table from wikipedia shows the SQL operators.
Operator | Description | Example |
---|---|---|
|
Equal to |
|
|
Not equal |
|
|
Greater than |
|
|
Less than |
|
>= |
Greater than or equal to |
|
⇐ |
Less than or equal to |
|
[ |
Between an inclusive range. Or not between an inclusive range if |
|
[ |
Equal to one of many possible values. Or not equal to one of many possible values. |
|
|
Compare to |
|
|
Compare to |
|
|
Is equal to value or both are |
|
|
Used to change column name when viewing results |
|
Predicates
Predicates are conditions that are evaluated into true
or false
. For example, the furry = TRUE
and has_claws = FALSE
portions of the following query evaluates to true
.
SELECT * FROM pets WHERE furry = TRUE OR has_claws = FALSE;