编写一个适用于整个数据库而不是表的查询 [英] write a query that applies to an entire db instead of a table
本文介绍了编写一个适用于整个数据库而不是表的查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以编写一个适用于整个数据库而不是一个表的查询.
Is it possible to write a query that applies to an entire database as opposed to one table.
所以,而不是使用:
select * from table_name where columnName = ?
我可以说 select * db_tables from from db where table 包含 A 列吗?
Can I say select * db_tables from from db where the table contains the column A?
有可能吗?谢谢
推荐答案
你当然可以!
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME like '%A'
这篇关于编写一个适用于整个数据库而不是表的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文