SELECT

Applies to: sql

SELECT is the core SQL query: it reads rows from one or more tables, optionally filtered by WHERE, ordered by ORDER BY, and limited by LIMIT. You list the columns (a projection) you want back.

SELECT name, age
FROM   users
WHERE  age >= 18
ORDER BY age DESC;

See also: join, group-by, aggregate-function