MYSQL中只知表名查询属于哪个SCHEMA

只知道表名XXX查该表属于哪个schema、以及该表有哪些列等信息

SELECT * from information_schema.columns WHERE table_name = 'xxx';

 
只知道列名XXX查哪个schema有该列、以及有列名为XXX的表有哪些等
SELECT * from information_schema.columns WHERE column_name = 'XXX';
 
 
参考链接:http://blog.163.com/ranma2151920@126/blog/static/9502770620130951445162/
posted on 2017-12-15 11:07  @ 小浩  阅读(4860)  评论(0编辑  收藏  举报