Jun 20, 2002 #1 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!
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!
Jun 20, 2002 1 #2 tlbroadbent MIS Mar 16, 2001 9,982 US Select * From information_schema.columns Where column_name='cust_id' Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions. Upvote 0 Downvote
Select * From information_schema.columns Where column_name='cust_id' Terry L. Broadbent - DBA Computing Links: http://tlbroadbent.home.attbi.com/prog.htm faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
Jun 20, 2002 #3 Grimey Programmer Apr 30, 2002 2 GB 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 Upvote 0 Downvote
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