SQL is case usually insensitive, apart from table and field names (which may or may not be case sensitive depending on what platform you're on -- on Unix they are usually case sensitive, on Windows they usually aren't).
String data can be delimited with either double or single quotes. Numerical data does not need to be delimited.
Wildcards may be used when searching for string data. A % (percent) sign is used to indicated multiple characters (much as an asterisk is used in DOS or Unix filename wildcards) while the underscore character (_) can be used to indicate a single character, similar to the ? under Unix or DOS.
The following comparison operators may be used:
Table 2-7. Comparison Operators
Operator | Meaning |
---|---|
= | Equality |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
<> | Inequality |
like | Wildcard matching |
In the following syntax examples, the term condition is used as shorthand for any expression which can be evaluated for truth, for instance 2 + 2 = 4 or name like "A%".
Conditions may be combined by using and and or; use round brackets to indicate precedence. For instance, name like "A%" or name like "B%" will find all records where the ``name'' field starts with A or B.