Mysql - find a table in all database

后端 未结 1 998
醉梦人生
醉梦人生 2021-02-05 09:34

Is there any command that I can locate a certain table from all databases? Since I forgot where the table is. Thanks.

相关标签:
1条回答
  • 2021-02-05 09:58

    Use the MySQL specific:

    SHOW TABLES
    

    ...or use the ANSI standard, INFORMATION_SCHEMA.TABLES:

    SELECT table_name,
           table_schema AS dbname
      FROM INFORMATION_SCHEMA.TABLES
      WHERE table_name='searched table name'
    
    0 讨论(0)
提交回复
热议问题