Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to find in which all tables a column exists for a datatbase in sql server 2005?
I know whether table exists for a db and also whether a colum exists for a table. I want in which all tables for a database in sql server the column exists.
Posted

Did the block Google [^]at your place?

The first article itself is promising

http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/[^]
 
Share this answer
 
Comments
Maciej Los 6-May-14 6:39am    
+5
Manas Bhardwaj 6-May-14 6:39am    
Thx Maciej!
SELECT *
FROM information_schema.COLUMNS
WHERE column_name LIKE '%Column_name%'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900