Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Find out which table a column is in?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-07-09 : 10:57:46
Jacques writes "I have a table column name. How would I go about to find out in which table this column is in, without having to browse through each table with MS SQL Enterprise manager?"

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2004-07-09 : 10:57:46
I'd look in the information schema views. Search the site on information schema and you'll find a few articles on it.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-07-09 : 12:38:10
SELECT TOP 10 *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME = 'MyColumnName'
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2004-07-12 : 03:39:53
why TOP 10?

------------------------
I think, therefore I am
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-12 : 08:26:31
Because there might be thousands....millions.....biiiiiiiilllllllllions!!!!

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-07-12 : 13:55:02
On no, I've got a habit in common with M.O.DBA ...

Kristen
Go to Top of Page
   

- Advertisement -