查询在一个数据库中某个字段存在于哪些表
select
TABLE_NAME
from
information_schema.`COLUMNS`
where
TABLE_SCHEMA=
'dbname'
and
COLUMN_NAME=
'role_id'
select
TABLE_NAME
from
information_schema.`COLUMNS`
where
TABLE_SCHEMA=
'dbname'
and
COLUMN_NAME=
'role_id'