Use SHOW and DESCRIBE commands to list tables and view column-level details in any Snowflake schema.
Confirming column names, data types, and constraints helps you write joins, validate ETL jobs, and detect breaking model changes.
Run SHOW TABLES IN SCHEMA ;
. The result set includes table name, kind, owner, row count, and comment.
Use DESC TABLE schema.table_name;
to return column order, names, data types, nullability, default values, and policy tags.
SHOW COLUMNS IN TABLE schema.table_name;
provides similar output but lets you query the results with RESULT_SCAN()
.
Wrap the command in a sub-query: SELECT * FROM TABLE(RESULT_SCAN(LAST_QUERY_ID())) WHERE type='NUMBER' ORDER BY ordinal_position;
.
Loop through table names in a scripting block, or generate SQL with SHOW TABLES
+ DESCRIBE TABLE
for each table.
Always include the database and schema in fully-qualified names. Store SHOW/RESULT_SCAN
queries in version control so teammates reuse them.
Omitting the schema qualifier: prefix tables with database.schema to avoid “table not found” in other contexts.
Using INFORMATION_SCHEMA for real-time structure: it can lag. Prefer SHOW
or DESCRIBE
for the latest metadata.
See the FAQ below for quick answers on permissions, large schemas, and querying RESULT_SCAN
.
You need the USAGE privilege on the database and schema plus OWNERSHIP or SELECT on the table.
Store the last query ID and wrap it with COPY INTO @~
to unload the RESULT_SCAN to CSV.
Query SHOW TABLES
into a temp table, then iterate with Snowflake Scripting to DESCRIBE each table automatically.