51Testing软件测试论坛
标题: 【我分享】MySQL--查找一个表名或字段名的SQL语句 [打印本页]
作者: yanfang_zheng 时间: 2015-1-3 21:55
标题: 【我分享】MySQL--查找一个表名或字段名的SQL语句
在Mysql 众多表中查找一个表名或者字段名的 SQL 语句:
方法一:SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE 'Name';
方法二:SELECT column_name from information_schema.columns WHERE column_name LIKE '%searchTerm%' AND table_schema = 'yourDB';
方法三:SELECT column_name from information_schema.columns WHERE column_name LIKE '%searchTerm%' AND table_schema = 'yourDB' AND table_name = 'yourDBTable';
作者: fhhh_eyou 时间: 2015-12-26 11:48
关注
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) |
Powered by Discuz! X3.2 |