[Teach Youself SQL in 10 Minutes] SELECT Clause Ordering

 

Clause

Description

Required

SELECT

Columns or expressions to be returned

Yes

FROM

Table to retrieve data from

Only if selecting data from a table

WHERE

Row-level filtering

No

GROUP BY

Group specification

Only if calculating aggregates by group

HAVING

Group-level filtering

No

ORDER BY

Output sort order

No

你可能感兴趣的:(select)