Skip to content

Commit 2f76c4c

Browse files
💬Generate LLM translations (#2203)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e8d2ffc commit 2f76c4c

File tree

3 files changed

+111
-1
lines changed

3 files changed

+111
-1
lines changed

docs/cn/sql-reference/10-sql-commands/00-ddl/04-sequence/desc-sequence.md

Lines changed: 25 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: SHOW SEQUENCES
3+
sidebar_position: 3
4+
---
5+
6+
import FunctionDescription from '@site/src/components/FunctionDescription';
7+
8+
<FunctionDescription description="Introduced or updated: v1.2.742"/>
9+
10+
返回已创建序列的列表。
11+
12+
## 语法
13+
14+
```sql
15+
SHOW SEQUENCES [ LIKE '<pattern>' | WHERE <expr> ]
16+
```
17+
18+
| 参数 | 描述 |
19+
|-----------|---------------------------------------------------------------------------------------------------------------------------|
20+
| LIKE | 使用区分大小写的模式匹配按名称筛选结果。 |
21+
| WHERE | 使用 WHERE 子句中的表达式筛选结果。您可以根据结果集中的任何列进行筛选,例如 `name``start``interval``current``created_on``updated_on``comment`。例如:`WHERE start > 0``WHERE name LIKE 's%'`|
22+
23+
## 示例
24+
25+
```sql
26+
-- 创建一个序列
27+
CREATE SEQUENCE seq;
28+
29+
-- 显示所有序列
30+
SHOW SEQUENCES;
31+
32+
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
33+
│ name │ start │ interval │ current │ created_on │ updated_on │ comment │
34+
├────────┼────────┼──────────┼─────────┼────────────────────────────┼────────────────────────────┼──────────────────┤
35+
│ seq │ 1112025-05-20 02:48:49.7493382025-05-20 02:48:49.749338NULL
36+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
37+
38+
-- 在 INSERT 语句中使用序列
39+
CREATE TABLE tmp(a int, b uint64, c int);
40+
INSERT INTO tmp select 10,nextval(seq),20 from numbers(3);
41+
42+
-- 使用后显示序列
43+
SHOW SEQUENCES;
44+
45+
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
46+
│ name │ start │ interval │ current │ created_on │ updated_on │ comment │
47+
├────────┼────────┼──────────┼─────────┼────────────────────────────┼────────────────────────────┼──────────────────┤
48+
│ seq │ 1142025-05-20 02:48:49.7493382025-05-20 02:49:14.302917NULL
49+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
50+
51+
-- 使用 WHERE 子句筛选序列
52+
SHOW SEQUENCES WHERE start > 0;
53+
54+
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
55+
│ name │ start │ interval │ current │ created_on │ updated_on │ comment │
56+
├────────┼────────┼──────────┼─────────┼────────────────────────────┼────────────────────────────┼──────────────────┤
57+
│ seq │ 1142025-05-20 02:48:49.7493382025-05-20 02:49:14.302917NULL
58+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
59+
60+
-- 按名称模式筛选序列
61+
SHOW SEQUENCES LIKE 's%';
62+
63+
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
64+
│ name │ start │ interval │ current │ created_on │ updated_on │ comment │
65+
├────────┼────────┼──────────┼─────────┼────────────────────────────┼────────────────────────────┼──────────────────┤
66+
│ seq │ 1142025-05-20 02:48:49.7493382025-05-20 02:49:14.302917NULL
67+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

docs/cn/sql-reference/10-sql-commands/00-ddl/index.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,44 @@ title: DDL (数据定义语言) 命令
99
- [数据库](00-database/index.md)
1010
- [](01-table/index.md)
1111
- [视图](05-view/index.md)
12+
- [字典](17-dictionary/index.md)
1213

1314
## 数据库性能和索引
1415

1516
- [聚簇键](06-clusterkey/index.md)
1617
- [聚合索引](07-aggregating-index/index.md)
18+
- [倒排索引](07-inverted-index/index.md)
19+
- [Ngram 索引](07-ngram-index/index.md)
20+
- [虚拟列](07-virtual-column/index.md)
1721

1822
## 用户、角色和安全管理
1923

2024
- [用户](02-user/index.md)
2125
- [网络策略](12-network-policy/index.md)
2226
- [掩码策略](12-mask-policy/index.md)
27+
- [密码策略](12-password-policy/index.md)
2328

2429
## 数据暂存和处理
2530

2631
- [Stage](03-stage/index.md)
2732
- [](04-stream/index.md)
33+
- [序列](04-sequence/index.md)
34+
- [任务](04-task/index.md)
2835
- [连接](13-connection/index.md)
2936
- [文件格式](13-file-format/index.md)
3037

38+
## 事务和变量管理
39+
40+
- [事务](14-transaction/index.md)
41+
- [变量](15-variable/index.md)
42+
3143
## 函数和外部集成
3244

3345
- [UDF (用户自定义函数)](10-udf/index.md)
34-
- [外部函数](11-external-function/index.md)
46+
- [外部函数](11-external-function/index.md)
47+
- [存储过程](18-procedure/index.md)
48+
- [通知](16-notification/index.md)
49+
50+
## 计算资源管理
51+
52+
- [计算集群](19-warehouse/index.md)

0 commit comments

Comments
 (0)