I've started work as an SQL Server DBA.. there's a lot to learn, so i've created this blog to help me add generic examples I gain along the way, so I don't forget them.
Thursday, 10 March 2011
Find All Tables with Column Name
When working with large databases, it's often difficult to track down related tables. The following SQL works for SQL Server 2008;
SELECT OBJECT_NAME(object_id), * from sys.columns where name like '%col_name%';
Simple replace col_name with the name of the column you are searfching for.
No comments:
Post a Comment