SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT]
[SQL_BUFFER_RESULT][SQL_CACHE | SQL_NO_CACHE]
[SQL_CALC_FOUND_ROWS] [HIGH_PRIORITY] [DISTINCT | DISTINCTROW |
ALL] select_expression,... [INTO {OUTFILE | DUMPFILE}
'file_name' export_options] [FROM table_references [WHERE
where_definition] [GROUP BY {unsigned_integer | col_name |
formula} [ASC | DESC], ... [WITH ROLLUP]] [HAVING
where_definition] [ORDER BY {unsigned_integer | col_name |
formula} [ASC | DESC] ,...] [LIMIT [offset,] row_count |
row_count OFFSET offset] [PROCEDURE
procedure_name(argument_list)] [FOR UPDATE | LOCK IN SHARE
MODE]]
table_references: table_reference, table_references
table_reference [INNER | CROSS] JOIN table_reference
[join_condition] table_reference STRAIGHT_JOIN table_reference
table_reference LEFT [OUTER] JOIN table_reference
[join_condition] table_reference NATURAL [LEFT [OUTER]] JOIN
table_reference table_reference RIGHT [OUTER] JOIN
table_reference [join_condition] table_reference NATURAL [RIGHT [OUTER]]
JOIN table_reference
table_reference: table_name [[AS] alias] [[USE INDEX (key_list)]
| [IGNORE INDEX (key_list)] | [FORCE INDEX (key_list)]]
join_condition: ON conditional_expr | USING (column_list)