只知道表名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/