开发者

Finding the column in tables? [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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜