views:

19

answers:

1

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

+1  A: 

Use the MySQL specific:

SHOW TABLES

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

SELECT table_name,
       table_schema AS database
  FROM INFORMATION_SCHEMA.TABLES
OMG Ponies
But in this way, I still don't know which database that table belongs to.
Stan
@Stan: I updated the INFORMATION_SCHEMA query to exist the database the table exists in.
OMG Ponies