SQL Server: Find tables containing column name
To find all the user tables that contain a particular column name run the following command on the relevant database:
SELECT name FROM sysobjects WHERE xtype='U' and id IN( SELECT id FROM syscolumns
WHERE name like '%COLUMN NAME%' )
Advertisement
Posted on July 20, 2010, in IT and tagged sql server. Bookmark the permalink. Leave a Comment.
Leave a Comment
Comments (0)