> SQL queries that give you all of the rows in a table are useful for seeing what is in a database, but it is a rare occasion when you want to see everything.
> The WHERE clause is used to specify a search condition (also called a predicate) to obtain the rows you wish to retrieve when the condition is true.
> Rows that do not meet the WHERE condition, or are unknown, are excluded.
> Character strings are compared by their collating sequence. “<” means precedes. “>” means follows. See Collating Sequence.
> Numbers are compared by their arithmetic value. “<” means less than. “>” means greater than.
> Datetimes are compared chronologically. “<” means earlier. “>” means later.
SELECT [ALL | DISTINCT] [* | column1[, column2, ...]]
FROM table1[, table2, ...]
WHERE testcolumn oper value, ...;
> In the WHERE search condition, testcolumn is the name of a column in the FROM table.
> Testcolumn does not have to be listed in the SELECT columns.
> Oper is one of the comparison operators: =, <>, <, <=, >, >=, BETWEEN, LIKE, IN, IS NULL, AND, OR, NOT.
> Value is a value that is compared to the value in the testcolumn.
> Testcolumn or value can be an expression, which is any valid combination of column names, functions, literals and operators that solve to a single value.
> Access, DB2, and SQL Server are case insensitive. That is ‘a’ = ‘A’.
> Oracle and PostgreSQL are case sensitive. That is ‘a’ is not = to ‘A’.
> MySQL is case insensitive in WHERE comparisons, and case sensitive in string functions.