List tables in Snowflake

Query below lists all tables in Snowflake database.

Query

select table_schema, 
       table_name, 
       created as create_date,
       last_altered as modify_date
from information_schema.tables 
where table_type = 'BASE TABLE'
order by table_schema,
        table_name; 

Columns

  • schema_name - schema name
  • table_name - table name
  • create_date - date the table was created
  • modify_date - date the table was last modified by using an ALTER statement

Rows

  • One row represents one table in the database
  • Scope of rows: all tables in the database
  • Ordered by schema and name

Sample results

List of tables in the SNOWFLAKE_SAMPLE_DATA database.

You could also get this

Get this interactive HTML data dictionary in minutes with Dataedo.

See live HTML data dictionary sample

Try for free

0
There are no comments. Click here to write the first comment.