查询在一个数据库中某个字段存在于哪些表

select TABLE_NAME
from information_schema.`COLUMNS` 
where TABLE_SCHEMA='dbname'
and COLUMN_NAME='role_id'

posted on 2016-05-26 10:52  帅胡  阅读(428)  评论(0编辑  收藏  举报

导航