The SELECT Statement

The SELECT Statement: The SELECT Statement: an overview, SELECT query Structure, Simple SELECT Query, Specifying Columns, Calculations in Columns.

Updated

  1. The SELECT Statement: an overview (Novice): A SELECT statement, or query, asks the database a question and returns the rows and columns that answer it.
  2. SELECT query Structure (Novice): A SELECT query is built from keywords that must appear in a fixed order: SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY and LIMIT.
  3. Simple SELECT Query (Novice): Use SELECT * FROM to return every column and every row of a table or view.
  4. Specifying Columns (Novice): List the columns you want after SELECT, in the order you want them, instead of using *.
  5. Calculations in Columns (Apprentice): Calculate a new column from other columns in the same row, such as sales_price * quantity.