Description
Lists all tables, views, materialized views, external tables, and dynamic tables under the specified Schema.
Syntax
Parameter Description
| Parameter | Required | Description |
|---|---|---|
IN schema_name | No | Specifies the Schema to query. If not specified, the current Schema is used |
LIKE 'pattern' | No | Filters by table name, supports % (any string) and _ (single character), case-insensitive. Cannot be used together with WHERE |
WHERE expr | No | Filters by return fields; supported fields: table_name, is_view, is_materialized_view, is_external, is_dynamic |
LIMIT num | No | Limits the number of rows returned |
Return Field Description
| Field | Description |
|---|---|
schema_name | Schema name |
table_name | Table name |
is_view | Whether it is a view |
is_materialized_view | Whether it is a materialized view |
is_external | Whether it is an external table |
is_dynamic | Whether it is a dynamic table |
Usage Examples
-
Query all tables under the
doc_testSchema: -
Show only regular tables (exclude views, materialized views, external tables, and dynamic tables):
-
Fuzzy filter by name:
-
View all views under the current Schema:
-
Exact filter by name (WHERE mode, strings must be quoted):
Notes
LIKEandWHEREcannot be used together.- String values in
WHEREmust be quoted, e.g.,WHERE table_name='employees'(do not writeWHERE table_name=employees). - The result includes all types of table objects, differentiated by the
is_*fields.
