Finding the column in tables? [duplicate]
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...
You could use the INFORMATION_SCHEMA.COLUMNS system view
:
SELECT DISTINCT table_name
FROM information_schema.columns
WHERE column_name = 'eno'
精彩评论