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
  • 29,607
  • 57
  • 139
  • 219

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
  • 2,037
  • 4
  • 8
  • 17
faester
  • 14,886
  • 5
  • 45
  • 56