Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Looking for a table....

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2008-12-01 : 11:46:49
Does any one know of an easy and fast way to search all of the tables in a database for a particular field?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-01 : 12:36:13
if you want to search all tables for a value use below

http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-01 : 12:37:32
and if your attempt is find all tables which has a particular column, then use

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME='your column'
Go to Top of Page
   

- Advertisement -