SHOW TABLES and information-schema queries reveal all tables in a Snowflake account, database, or schema.
Run SHOW TABLES;
. The result grid displays table names, database, schema, row counts, owners, and creation timestamps.
Qualify the command: SHOW TABLES IN SCHEMA ecommerce.public;
. If the database is not your current one, add it explicitly.
Filter with LIKE or STARTS WITH: SHOW TABLES LIKE 'prod%';
or SHOW TABLES STARTS WITH 'ord';
.Both clauses are case-insensitive unless quoted identifiers are used.
Append WITH TYPE = 'PERMANENT'
, 'TRANSIENT'
, or 'TEMP'
after the command: SHOW TABLES WITH TYPE = 'TRANSIENT';
.
Yes.Capture the output into a Snowflake result table and query it:SHOW TABLES IN SCHEMA ecommerce.public;
SELECT "name", "rows" FROM TABLE(RESULT_SCAN(LAST_QUERY_ID())) ORDER BY rows DESC;
For scripts, query INFORMATION_SCHEMA.TABLES
:SELECT table_name FROM ecommerce.public.INFORMATION_SCHEMA.TABLES WHERE table_type='BASE TABLE';
.
This avoids parsing SHOW output.
SHOW returns rich metadata (cluster keys, comments) and supports pattern filters.INFORMATION_SCHEMA
is ANSI-style SQL and better for joins.
Loop through schemas:SHOW SCHEMAS IN DATABASE ecommerce;
. Then execute the generated statements.
SELECT listagg('SHOW TABLES IN SCHEMA '||"name"||';','\n') FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()));
.
No, unless identifiers are quoted. Unquoted names are upper-cased internally.
No. Use SHOW VIEWS
or query INFORMATION_SCHEMA.VIEWS
.
After SHOW TABLES, query the RESULT_SCAN output column bytes
to see storage size per table.