Description
This command is used to query the list of all tables, views, and materialized views under the current database schema. By using different filter conditions, users can quickly locate the required database objects.
Syntax
Parameter Details
-
LIKE pattern
: This option is optional and is used to filter by object name. It supports case-insensitive pattern matching and can use SQL wildcards%
(representing any number of characters) and_
(representing a single character). Example:LIKE '%testing%'
. Note that this filter cannot be used simultaneously with theWHERE
condition. -
IN schema_name
: This option is optional and allows the user to specify a particular schema name, thereby listing all database objects under that schema. -
WHERE expr
: This option is optional and supports users in filtering based on the fields displayed by theSHOW TABLES
command. Users can filter the results through expressions to more accurately find the required database objects. The fields that support filtering aretable_name
,is_view
,is_materialized_view
,is_external
,is_dynamic
.
Usage Example
- Query all tables under the current schema:
- Query all views under the specified schema:
- Query tables and views under the current schema that contain "test" in their names:
- Query all materialized views under the current schema:
- Query all dynamic tables under the current schema: