Description
The SHOW SCHEMAS statement is designed to display a list of all schemas in the current workspace. Users can view relevant schemas based on specific schemas or conditions through flexible filtering criteria. Additionally, using the EXTENDED keyword can provide more detailed information about each schema, such as its type (MANAGED or EXTERNAL).
Syntax
Parameter Details
LIKE pattern: This parameter supports filtering output results through pattern matching. The matching is case-insensitive and supports SQL wildcards%(representing any number of characters) and_(representing any single character). For example,LIKE '%report%'will filter out all SCHEMA names that contain the string "report". Note that theLIKEclause is mutually exclusive with theWHEREclause and cannot be used simultaneously.EXTENDED: When using this keyword, the command will return additional columns with extra information, such as thetypecolumn that shows the SCHEMA type, which helps users understand the attributes of each SCHEMA.WHERE expr: This parameter allows users to perform more detailed filtering based on the fields displayed by theSHOW SCHEMAScommand to find SCHEMAS that meet specific conditions.
Example
Here are some usage examples of the SHOW SCHEMAS command:
- View all SCHEMAS in the current workspace:
- Get all MANAGED type SCHEMAs and their detailed information:
- If you need to find a specific SCHEMA name, you can use the
WHEREclause to filter by SCHEMA name:
Permission Requirements
In order to execute the SHOW SCHEMAS command, the user must have the READ METADATA permission for the corresponding SCHEMA.
