Column Search | SansSQL

Tuesday, December 25, 2007

Column Search

/*This script searches the specified column name from the database and displays the table names in which it is present.*/

select sysobjects.name, * from syscolumns, sysobjects where syscolumns.name like '%EmpID%'and sysobjects.id = syscolumns.id and (sysobjects.xtype='U' or sysobjects.xtype='S')

No comments:

Post a Comment