0

Possible Duplicate:
SQL Server 2008: find all tables containing column with specified name

Hi all,

I have 30 tables in my database, in some of tables i have a common column, assume 'eno'. How can i find the tables of 'eno'. Thank you...

Community
  • 1
  • 1
Surya sasidhar
  • 28,627
  • 55
  • 134
  • 215

1 Answers1

0

You could use the INFORMATION_SCHEMA.COLUMNS system view:

SELECT DISTINCT table_name
FROM   information_schema.columns
WHERE  column_name = 'eno'  
RF1991
  • 1,408
  • 1
  • 6
  • 12
faester
  • 14,578
  • 5
  • 43
  • 55