如何在sql server 2005中找到数据库中所有表的列? [英] How to find in which all tables a column exists for a database in sql server 2005?

查看:85
本文介绍了如何在sql server 2005中找到数据库中所有表的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql server 2005中找到数据库中存在列的所有表?

我知道数据库是否存在表以及表是否存在列。我希望在sql server中的数据库的所有表都存在。

How to find in which all tables a column exists for a datatbase in sql server 2005?
I know whether table exists for a db and also whether a colum exists for a table. I want in which all tables for a database in sql server the column exists.

推荐答案

Google [ ^ ]在你的位置?



第一篇文章本身很有前途



http://blog.sqlauthority.com/2008/08/06/sql- server-query-to-find-column-from-all-tables-of-database / [ ^ ]
Did the block Google [^]at your place?

The first article itself is promising

http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/[^]


SELECT *

FROM information_schema.COLUMNS

WHERE column_name LIKE'%Column_name%'
SELECT *
FROM information_schema.COLUMNS
WHERE column_name LIKE '%Column_name%'


这篇关于如何在sql server 2005中找到数据库中所有表的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆