全部产品
云市场

SELECT语法

更新时间:2019-02-02 18:04:20

SELECT用于返回表和用户定义的函数中的行,具体语法如下

  1. [ WITH with_subquery [, ...] ]
  2. SELECT
  3. [ [ ALL | DISTINCT ] | select_expr [ AS output_name ] [, ...] ]
  4. [ FROM table_reference [, ...] ]
  5. [ WHERE condition ]
  6. [ GROUP BY expression [, ...] ]
  7. [ HAVING condition ]
  8. [ { UNION | ALL | INTERSECT | EXCEPT | MINUS } query ]
  9. [ ORDER BY expression
  10. [ ASC | DESC ]
  11. [ LIMIT { number | ALL } ]

本节包含以下几个部分: