Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f77a7550
提交
f77a7550
authored
2月 01, 2019
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Describe SELECT clauses in logical execution order
上级
92935c8a
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
11 行删除
+20
-11
help.csv
h2/src/docsrc/help/help.csv
+20
-11
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
f77a7550
...
...
@@ -6,11 +6,12 @@
SELECT [ TOP term [ PERCENT ] [ WITH TIES ] ]
[ DISTINCT [ ON ( expression [,...] ) ] | ALL ]
selectExpression [,...]
FROM tableExpression [,...] [ WHERE expression ]
[ FROM tableExpression [,...] ]
[ WHERE expression ]
[ GROUP BY expression [,...] ] [ HAVING expression ]
[ QUALIFY expression ]
[ WINDOW { { windowName AS windowSpecification } [,...] } ]
[ { UNION [ ALL ] |
MINUS | EXCEPT
| INTERSECT } select ]
[ { UNION [ ALL ] |
EXCEPT | MINUS
| INTERSECT } select ]
[ ORDER BY order [,...] ]
[ LIMIT expression [ OFFSET expression ] [ SAMPLE_SIZE rowCountInt ] ]
[ [ OFFSET expression { ROW | ROWS } ]
...
...
@@ -19,27 +20,35 @@ FROM tableExpression [,...] [ WHERE expression ]
[ FOR UPDATE ]
","
Selects data from a table or multiple tables.
WHERE filters rows before other operations.
GROUP BY groups the result by the given expression(s).
If GROUP BY clause is not specified, but non-window aggregate functions are used or HAVING is specified
all rows are grouped together.
Aggregate functions are evaluated, SAMPLE_SIZE limits the number of rows read.
HAVING filters rows after grouping and evaluation of aggregate functions.
Window functions are evaluated.
QUALIFY filters rows after evaluation of window functions.
DISTINCT removes duplicates.
UNION, EXCEPT (MINUS), and INTERSECT combine the result of this query with the results of another query.
Multiple set operators (UNION, INTERSECT, MINUS, EXCEPT) are evaluated from left to right.
For compatibility with other databases and future versions of H2 please use parentheses.
ORDER BY sorts the result by the given column(s) or expression(s).
UNION combines the result of this query with the results of another query.
Number of rows in output can be limited either with standard OFFSET / FETCH,
with non-standard LIMIT / OFFSET, or with non-standard TOP clauses.
Different clauses cannot be used together.
OFFSET specifies how many rows to skip.
Please note that queries with high offset values can be slow.
FETCH FIRST/NEXT, LIMIT or TOP limits the number of rows returned by the query (no limit if null or smaller than zero).
If PERCENT is specified number of rows is specified as a percent of the total number of rows
and should be an integer value between 0 and 100 inclusive.
WITH TIES can be used only together with ORDER BY and means that all additional rows that have the same sorting position
as the last row will be also returned.
OFFSET specifies how many rows to skip.
Please note that queries with high offset values can be slow.
SAMPLE_SIZE limits the number of rows read for aggregate queries.
Multiple set operators (UNION, INTERSECT, MINUS, EXCEPT) are evaluated
from left to right. For compatibility with other databases and future versions
of H2 please use parentheses.
If FOR UPDATE is specified, the tables or rows are locked for writing.
This clause is not allowed in DISTINCT queries and in queries with non-window aggregates, GROUP BY, or HAVING clauses.
...
...
@@ -248,7 +257,7 @@ Selects data from a table.
This command is an equivalent to SELECT * FROM tableName.
FROM, WHERE, GROUP BY, HAVING, and WINDOW clauses from the SELECT command are not allowed.
FROM, WHERE, GROUP BY, HAVING,
QUALIFY,
and WINDOW clauses from the SELECT command are not allowed.
","
TABLE TEST;
TABLE TEST ORDER BY ID FETCH FIRST ROW ONLY;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论