select语句完整语法如下:
- select 目标表的列名或列表达式序列
- from 基本表名和(或)视图序列
- [where 行条件表达式]
- [group by 列名序列 [having 组条件表达式]]
- [order by 列名 [asc | desc]]
(8) SELECT (9) DISTINCT <select_list> (1) FROM <left_table> (3) <join_type> JOIN <right_table> (2) ON <join_condition> (4) WHERE <where_condition> (5) GROUP BY <group_by_list> (6) WITH {CUBE | ROLLUP} (7) HAVING <having_condition> (10) ORDER BY <order_by_list> (11) LIMIT <limit_number>