1.在mysql中如何查询某字段在哪个表中?
select table_schema,table_name from information_schema.columns where column_name = '字段名'
- table_schema 数据库名称
- table_name 表名
- column_name = '字段名'(要查询的列)
举个栗子,在mysql中查找查询PassWord字段在哪个表中:
select table_schema,table_name from information_schema.columns where column_name = 'PassWord'
结果如下 :