SHOW SCHEMAS (DATABASES)
Syntax
SHOW SCHEMAS|DATABASES [ (FROM| IN) catalog ] [ LIKE pattern [ESCAPE escapeChar]]
Description
In this statement, DATABASES and SCHEMAS are conceptually equivalent and interchangeable. This statement is used to list all schemas defined in MetaStore. The optional clause LIKE can use rule operations to filter results. It supports the wildcards '*' (matching any character) and '|' (matching optional items).
Example
SHOW SCHEMAS;
List all schemas whose schema name prefix is t in a specified catalog:
SHOW SCHEMAS FROM hive LIKE 't%'; --Equivalent writing: SHOW SCHEMAS IN hive LIKE 't%';
If a character in the matching character string conflicts with the wildcard, you can specify an escape character to identify the character. For example, to query all schemas whose schema name prefix is pm_ in the hive catalog, set the escape character to /.
SHOW SCHEMAS IN hive LIKE 'pm/_%' ESCAPE '/';
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot