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 2005 Forums
 SQL Server Administration (2005)
 look for a column

Author  Topic 

eirikr
Starting Member

18 Posts

Posted - 2009-01-28 : 11:42:01
I have a database with hundred of tables
there is not any schemas diagram existed.
And i wanna look for a column "A" in one of the tables.
What should i do and how. May use T-sql

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-28 : 11:47:35
[code]SELECT OBJECT_NAME(object_id)as Tablename
FROM sys.columns
WHERE name = 'A'[/code]
Go to Top of Page

eirikr
Starting Member

18 Posts

Posted - 2009-01-28 : 12:06:38
TY so much
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-28 : 12:47:02
or use INFORMATION_SCHEMA view

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME='A'
Go to Top of Page
   

- Advertisement -