Skip to content

Commit 64931bc

Browse files
authored
Update stream-status.md
1 parent fea30a6 commit 64931bc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/en/sql-reference/20-sql-functions/17-table-functions/stream-status.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ Provides information about the status of a specified stream, yielding a single-c
1414
The presence of a `true` in the result (`has_data`) does **not** ensure the definite existence of change data capture records. Other operations, such as performing a table compact operation, could also lead to a `true` value even when there are no actual change data capture records.
1515
:::
1616

17+
:::note
18+
When using `STREAM_STATUS` in tasks, you must include the database name when referencing the stream (e.g., `STREAM_STATUS('mydb.stream_name')`).
19+
:::
20+
1721
## Syntax
1822

1923
```sql
20-
SELECT * FROM STREAM_STATUS('<stream_name>');
24+
SELECT * FROM STREAM_STATUS('<database_name>.<stream_name>');
25+
-- OR
26+
SELECT * FROM STREAM_STATUS('<stream_name>'); -- Uses current database
2127
```
2228

2329
## Examples
@@ -51,4 +57,7 @@ SELECT * FROM STREAM_STATUS('s');
5157
├──────────┤
5258
│ true │
5359
└──────────┘
54-
```
60+
61+
-- Example with database name specified
62+
SELECT * FROM STREAM_STATUS('mydb.s');
63+
```

0 commit comments

Comments
 (0)