文档首页/
MapReduce服务 MRS/
组件操作指南(LTS版)/
使用HetuEngine/
HetuEngine常见SQL语法说明/
HetuEngine DQL SQL语法说明/
SELECT
更新时间:2024-12-11 GMT+08:00
SELECT
语法
[/*+ query_rewrite_hint*/]
[ WITH [ RECURSIVE ] with_query [, ...] ]
SELECT [ ALL | DISTINCT ] select_expression [, ...]
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ]
[ HAVING condition]
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]
[ ORDER BY expression [ ASC | DESC ] [, ...] ]
[ OFFSET count [ ROW | ROWS ] ]
[ LIMIT { count | ALL } ]
[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES } ]
- from_item可以是以下形式:
- join_type可以是以下形式:
- [ INNER ] JOIN
- LEFT [ OUTER ] JOIN
- RIGHT [ OUTER ] JOIN
- FULL [ OUTER ] JOIN
- LEFT [SEMI] JOIN
- RIGHT [SEMI] JOIN
- LEFT [ANTI] JOIN
- RIGHT [ANTI] JOIN
- CROSS JOIN
- grouping_element可以是以下形式:
- ()
- expression
- GROUPING SETS ( ( column [, ...] ) [, ...] )
- CUBE ( column [, ...] )
- ROLLUP ( column [, ...] )
描述
从零个或多个表中检索行数据。
查询stu表的内容。
SELECT id,name FROM stu;