根据表名查库
SELECT table_schema FROM information_schema.TABLES WHERE table_name = '表名';
根据字段名查表
select table_schema,table_name from information_schema.columns where column_name = '字段名'
本文介绍如何使用SQL语句快速定位特定表名和字段名所在的数据表,包括两个实用的查询示例,帮助数据库管理员和开发人员提高工作效率。
根据表名查库
SELECT table_schema FROM information_schema.TABLES WHERE table_name = '表名';
根据字段名查表
select table_schema,table_name from information_schema.columns where column_name = '字段名'
345

被折叠的 条评论
为什么被折叠?