File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
docs/cn/sql-reference/20-sql-functions/17-table-functions Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,25 @@ import FunctionDescription from '@site/src/components/FunctionDescription';
55
66<FunctionDescription description =" 引入或更新于:v1.2.225 " />
77
8- 提供指定流的状态信息,生成一个单列结果 (` has_data ` ),其值可以是 ` true ` 或 ` false ` :
8+ 提供指定流的状态信息,返回一个单列结果 (` has_data ` ),其值可以是 ` true ` 或 ` false ` :
99
1010- ` true ` :表示流** 可能包含** 变更数据捕获记录。
1111- ` false ` :表示流当前不包含任何变更数据捕获记录。
1212
1313::: note
14- 结果中的 ` true ` 值** 并不** 确保一定存在变更数据捕获记录。其他操作,例如执行表压缩操作,也可能导致 ` true ` 值,即使实际上没有变更数据捕获记录。
14+ 结果中的 ` true ` (` has_data ` )** 并不** 确保一定存在变更数据捕获记录。其他操作,例如执行表压缩操作,也可能导致 ` true ` 值,即使实际上没有变更数据捕获记录。
15+ :::
16+
17+ ::: note
18+ 在任务中使用 ` STREAM_STATUS ` 时,引用流时必须包含数据库名称(例如 ` STREAM_STATUS('mydb.stream_name') ` )。
1519:::
1620
1721## 语法
1822
1923``` sql
20- SELECT * FROM STREAM_STATUS(' <stream_name>' );
24+ SELECT * FROM STREAM_STATUS(' <database_name>.<stream_name>' );
25+ -- 或
26+ SELECT * FROM STREAM_STATUS(' <stream_name>' ); -- 使用当前数据库
2127```
2228
2329## 示例
@@ -51,4 +57,7 @@ SELECT * FROM STREAM_STATUS('s');
5157├──────────┤
5258│ true │
5359└──────────┘
60+
61+ -- 指定数据库名称的示例
62+ SELECT * FROM STREAM_STATUS(' mydb.s' );
5463```
You can’t perform that action at this time.
0 commit comments