SELECT - Amazon Redshift

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

SELECT

返回表、视图和用户定义的函数中的行。

注意

单个 SQL 语句的最大大小为 16MB。

Syntax

[ WITH with_subquery [, ...] ] SELECT [ TOP number | [ ALL | DISTINCT ] * | expression [ AS output_name ] [, ...] ] [ FROM table_reference [, ...] ] [ WHERE condition ] [ GROUP BY expression [, ...] ] [ HAVING condition ] [ { UNION | ALL | INTERSECT | EXCEPT | MINUS } query ] [ ORDER BY expression [ ASC | DESC ] ] [ LIMIT { number | ALL } ] [ OFFSET start ]