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

select 语法

时间:2014-07-03 21:34:18      阅读:347      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   os   for   

select 语句主要语法:

SELECT select_list
  [ INTO new_table ]
  FROM table_source
  [ WHERE search_condition ]
  [ GROUP BY group_by_expression ]
  [ HAVING search_condition ]
  [ ORDER BY order_expression [ ASC | DESC ] ]


比较全的如下:

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, ...
    [INTO OUTFILE ‘file_name‘ export_options   | INTO DUMPFILE ‘file_name‘]
    FROM table_references
    [WHERE where_definition]
    [GROUP BY {col_name | expr | position}
      [ASC | DESC], ... [WITH ROLLUP]]
    [HAVING where_definition]
    [ORDER BY {col_name | expr | position}
      [ASC | DESC] , ...]
    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
    [PROCEDURE procedure_name(argument_list)]
    [FOR UPDATE | LOCK IN SHARE MODE]]

  

select 语法,布布扣,bubuko.com

select 语法

标签:des   style   blog   color   os   for   

原文地址:http://www.cnblogs.com/ywl925/p/3821015.html

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