在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';
 

你可能感兴趣的:(mysql)