开发者

Finding the column in tables? [duplicate]

开发者 https://www.devze.com 2023-03-04 21:34 出处:网络
This question already has answers here: Closed 11 years a开发者_如何转开发go. Possible Duplicate:
This question already has answers here: Closed 11 years a开发者_如何转开发go.

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'  
0

精彩评论

暂无评论...
验证码 换一张
取 消