The SELECT command uses clauses to specify the details of queries. The following table lists these clauses and provides a brief description of each. For detailed descriptions, follow the links.
SELECT List (SELECT Statement) | Appears as the first clause in a SELECT statement and determines which columns are output from the source rows |
FROM Clause (SELECT Statement) | Names the source tables for the query |
WHERE Clause (SELECT statement) | Defines the criteria that rows must meet to be selected for output |
GROUP BY Clause (SELECT Statement) | Groups identical output values in the named columns |
HAVING Clause (SELECT Statement) | Defines criteria that the groups of rows defined in the GROUP BY clause must satisfy to be output by the query |
ORDER BY Clause (SELECT Statement) | Sorts the output |
Possibly Nondeterministic Queries | In some cases the same query can produce different output tables on different implementations because of subtle implementation-dependent behaviors; such queries are called possibly nondeterministic queries |