SELECT
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
Synopsis
The SELECT
statement retrieves (part of) rows of specified columns that meet a given condition from a table. It specifies the columns to be retrieved, the name of the table, and the condition each selected row must satisfy.
Syntax
Diagram
Grammar
select ::= SELECT [ DISTINCT ] { '*' | column_name [ ',' column_name ... ] }
FROM table_name [ WHERE where_expression ];
Where
table_name
andcolumn_name
are identifiers.
Semantics
- An error is raised if the specified
table_name
does not exist. *
represents all columns.
WHERE Clause
- The
where_expression
must evaluate to boolean values. - The
where_expression
can specify conditions for any column.
While the where clause allows a wide range of operators, the exact conditions used in the where clause have significant performance considerations (especially for large datasets).
See Also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .