The SCHEMAS keyword is most commonly used with the SHOW command (SHOW SCHEMAS) to return a result set containing every schema the connected user can see. A schema is a logical container that groups database objects such as tables, views, functions, and procedures. In MySQL and MariaDB, SHOW SCHEMAS is a direct synonym for SHOW DATABASES. In Snowflake, Redshift, BigQuery, and other modern warehouses, SHOW SCHEMAS lists namespaces inside the current database or account.Because SCHEMAS is an information-retrieval keyword, it reads from system catalogs without modifying data. Permissions determine visibility: users must have at least USAGE (or equivalent) rights on a schema for it to appear. Many dialects support optional filtering (LIKE, ILIKE, IN, STARTS WITH) so you can narrow the result set.Caveats:- Not part of the core ANSI SQL standard, so syntax varies.- In PostgreSQL the equivalent is SELECT schema_name FROM information_schema.schemata; there is no SHOW SCHEMAS command.- In MySQL, the command returns both system and user databases unless you filter them out.- Case sensitivity follows the rules of the underlying database engine.
LIKE pattern
(string) - optional pattern for simple wildcard filtering.ILIKE pattern
(string) - case-insensitive pattern (Snowflake, Redshift).IN database_name
(identifier) - restricts listing to a specific database (Snowflake, BigQuery).STARTS WITH prefix
(string) - lists schemas whose names start with the prefix (Snowflake).LIMIT n
(integer) - limits number of rows returned (BigQuery).MySQL 5.0 (as synonym for SHOW DATABASES)
In MySQL they are interchangeable terms. In systems like Snowflake, Redshift, and PostgreSQL, a database can contain multiple schemas, each holding tables and other objects.
Yes. The user must have at least USAGE or equivalent permission on a schema for it to appear. Lacking privileges hides the schema from the result set.
Most dialects allow filtering. Use LIKE or ILIKE with wildcards in MySQL, Snowflake, Redshift, and BigQuery. Snowflake also supports STARTS WITH and IN DATABASE clauses.
SHOW SCHEMAS in Snowflake and Redshift includes metadata columns like created_on. In MySQL you will need to query information_schema.schemata for that detail.