Certification Review of SELECT

Okay. I am reading up every night to study for the SQL Expert certification exam. When you put DISTINCT in your SELECT statement, it operates on sets of columns that you use. It produces the same result as UNIQUE. Here are the different operations that are in play with your SQL statement:
  1. Projection
  2. Selection
  3. Joining
Projection is choosing a subset of columns. Selection is choosing a subset of rows. And joining is combining two or more tables.

A view acts like a table. It looks like a table. Behind the scenes, it runs a SELECT statement to produce its results.

Synonyms are aliases for existing objects. Private synonyms are owned by a schema. And public synonyms are owned by a user named PUBLIC.

The WHERE clause has access to all columns in a table, regardless of whether they exists in the SELECT list. The order of precedence, highest to lowest, of logical operators is NOT, AND, then OR.

If BETWEEN is in a WHERE clause, it is inclusive of the two end points given.

The ORDER BY also has access to all columns in the table. It is always the final part in a SQL statement. It can use alias names for sorting. You can also do positional ordering, the first column being number 1. NULL values always have the highest values.

I really have only one interesting fact about LIKE. The % is only expanded after the LIKE keyword. So don't use it on the left side!