展开全部
SQL数据库,查询bai数据库内含有某一列du(某字段,zhi如name)的所有表dao的步骤如下:
我们需要准版备的材料分别是:电脑权、sql查询器。
1、首先,打开sql查询器,连接上相应的数据连接,,例如test库。
2、点击“查询”按钮,输入:select table_name from information_schema.columns where table_schema="test" and column_name="name";。
3、点击“运行”按钮,此时会查询出符合条件的表名。
4、将查询语句调整为:select 'store' as table_name, `name` from store where `name`="A" union all select 'stu' as table_name, `name` from stu where `name`="A" union all select 'test' as table_name, `name` from test where `name`="A",点击“运行”按钮,即可查到含name='A'的表名。