Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify all tables using column name: CUST_ID??? 1

Status
Not open for further replies.

btturner

Programmer
May 17, 2001
175
US
fyi, I need to identify all tables in my Prod DB which use column "CUST_ID"

Can you please help me w/ a query... which will identify all SQL Server 2k tables (in a single database) which use this column name?

thanks!
 
This works for me in SQL7...

USE ProdDB

SELECT C.Name, T.Name
FROM syscolumns C
INNER JOIN sysobjects T
ON C.id = T.id
WHERE C.name='CUST_ID'


HTH,

Grimey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top