Thursday, October 27, 2011

How to find tables column list

We can use the following query to find a list of tables that contain a specific column name in entire database. 

SELECT * FROM INFORMATION_SCHEMA.COLUMNS where  COLUMN_NAME='column name'

If you are unsure what is the exact column name , you can use the following query: 

SELECT * FROM INFORMATION_SCHEMA.COLUMNS where  COLUMN_NAME='column name'



No comments:

Post a Comment

SSRS - How to Parameterizing the SQL Query

We need to create separated dataset to handle the pre defined list in that dataset we will use simple select statement to define the li...