
Show Databases:
What does it do?
Used to find:
- Which Databases are accessible to the current Role
Related Pages
create database
show schemas
show tables
SHOW DATABASES
Lists all the databases for which the Current User has at least USAGE privilege.
show databases;

The screenshot above lists the databases available to the current user.
Quick Tip - Filtering Output
You can filter the output of any SHOW command by re-querying the results using the table function result_scan(). The SQL query below shows databases order by the name column
select *
from table(result_scan(last_query_id()))
order by "name";

SHOW DATABASES LIKE 'A%'
Lists the accessible databases filtered by the search string.
show databases like 'A%';

The screenshot above shows the output when filtered by names starting with 'A%'
SHOW DATABASES HISTORY
It shows accessible databases, including those dropped but still within the data retention period.
show databases history;

The screenshot above shows the AIRBNB database was dropped, but it's within the Retention Time and can be un-dropped.
Further Information
Snowflake Documentation
About the author
After 30 years of experience building multi-terabyte data warehouse systems, I spent five years at Snowflake as a Senior Solution Architect, helping customers across Europe and the Middle East deliver lightning-fast insights from their data.
In 2023, he joined Altimate.AI, which uses generative artificial intelligence to provide Snowflake performance and cost optimization insights and maximize customer return on investment.
Certifications include Snowflake Data Superhero, Snowflake Subject Matter Expert, SnowPro Core, and SnowPro Advanced Architect.
Comments
Join the discussionNo comments yet. Be the first to comment.







