There are many ways to find out a specific column from the database objects like Tables and stored procedures.
1) Red Gate's SQL Search:
This tool will be integrated into SQL Server Management Studio once installed. This will help in searching across multiple object types and multiple databases.
2) Using a query:
The following query will find the tables and stored procedures that contain a certain
field.
SELECT sysobjects.name FROM syscolumns
LEFT JOIN sysobjects ON sysobjects.id = syscolumns.id
WHERE syscolumns.name like '%EmployeeID%'
ORDER BY 1
SELECT * FROM information_schema.columns
WHERE
column_name LIKE '%EmployeeID%'
No comments:
Post a Comment