Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
118f3610
提交
118f3610
authored
3月 18, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve documentation of SYSTEM_RANGE
上级
09697ba0
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
2 行删除
+17
-2
systemtables.html
h2/src/docsrc/html/systemtables.html
+17
-2
没有找到文件。
h2/src/docsrc/html/systemtables.html
浏览文件 @
118f3610
...
...
@@ -37,12 +37,27 @@ of all tables in the database as well as the current settings.
<h2
id=
"range_table"
class=
"notranslate"
>
Range Table
</h2>
<p>
The range table is a dynamic system table that contains all values from a start to an end value.
The table contains one column called X. Both the start and end values are included in the result.
Non-zero step value may be also specified, default is 1.
Start value, end value, and optional step value are converted to BIGINT data type.
The table contains one column called X.
If start value is greater than end value and step is positive the result is empty.
If start value is less than end value and step is negative the result is empty too.
If start value is equal to end value the result contains only start value.
Start value, start value plus step, start value plus step multiplied by two and so on are included in result.
If step is positive the last value is less than or equal to the specified end value.
If step in negative the last value is greater than or equal to the specified end value.
The table is used as follows:
</p>
<p>
Example:
</p>
<p>
Example
s
:
</p>
<pre>
SELECT X FROM SYSTEM_RANGE(1, 10);
-- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
SELECT X FROM SYSTEM_RANGE(1, 10, 2);
-- 1, 3, 5, 7, 9
SELECT X FROM SYSTEM_RANGE(1, 10, -1);
-- No rows
SELECT X FROM SYSTEM_RANGE(10, 2, -2);
-- 10, 8, 6, 4, 2
</pre>
<!-- [close] { -->
</div></td></tr></table>
<!-- } --><!-- analytics -->
</body></html>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论