码迷,mamicode.com
首页 > 其他好文 > 详细

SELECT 语句语法

时间:2019-01-24 19:01:59      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:help   lis   with   ctr   sele   pre   HERE   option   rollup   

SELECT
    [ALL | DISTINCT | DISTINCTROW ]
      [HIGH_PRIORITY]
      [STRAIGHT_JOIN]
      [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
      [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
    select_expr [, select_expr ...]
    [FROM table_references
      [PARTITION partition_list]
    [WHERE where_condition]
    [GROUP BY {col_name | expr | position}, ... [WITH ROLLUP]]
    [HAVING where_condition]
    [WINDOW window_name AS (window_spec)
        [, window_name AS (window_spec)] ...]
    [ORDER BY {col_name | expr | position}
      [ASC | DESC], ... [WITH ROLLUP]]
    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
    [INTO OUTFILE ‘file_name‘
        [CHARACTER SET charset_name]
        export_options
      | INTO DUMPFILE ‘file_name‘
      | INTO var_name [, var_name]]
    [FOR {UPDATE | SHARE} [OF tbl_name [, tbl_name] ...] [NOWAIT | SKIP LOCKED] 
      | LOCK IN SHARE MODE]]
  • mysql 终端下,使用help select命令查看。

SELECT 语句语法

标签:help   lis   with   ctr   sele   pre   HERE   option   rollup   

原文地址:https://www.cnblogs.com/cag2050/p/10316011.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!