表太多,只記得這個表有一個mygame的字段,但是並不知道這張表在那個數據庫下,只能根據這個字段查找對應的表和所在數據庫
select table_schema,table_name from information_schema.columns where column_name = '字段名'
演例:
mysql> select table_schema,table_name from information_schema.columns where column_name = 'gname';
查詢結果:
+--------------+-------------------+
| table_schema | table_name |
+--------------+-------------------+
| ccc | mygame | # 可知道在ccc這個數據庫下
| student | app01_class_grade |
+--------------+-------------------+
2 rows in set (0.36 sec)