Predictive Hacks

How to Find Tables that Contain a Specific Column in Snowflake

The scenario is that you would like to find out all the tables that contain a specific column in Snowflake as follows:

show columns like 'COLUMN_NAME' in schema "DB_NAME"."SCHEMA_NAME"

In the above example, we search for all tables under the database “DB_NAME” and under the schema “SCHEMA_NAME” that contain the column called “COLUMN_NAME”. You can have a look at the show columns Snowflake Documentation. The full syntax of the command is:

SHOW COLUMNS [ LIKE '<pattern>' ]
             [ IN { ACCOUNT | DATABASE [ <database_name> ] | SCHEMA [ <schema_name> ] | TABLE | [ TABLE ] <table_name> | VIEW | [ VIEW ] <view_name> } ]

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore


Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.


Intro to Chatbots with HuggingFace

In this tutorial, we will show you how to use the Transformers library from HuggingFace to build chatbot pipelines. Let’s