MySQL - query for last created table

Is there a query that will show the last created table in the database?

+5
source share
1 answer

In all the databases of your MySQL instance:

SELECT *
  FROM information_schema.TABLES
 ORDER BY CREATE_TIME DESC
 LIMIT 1

For the specific database you are connected to:

SELECT *
  FROM information_schema.TABLES
 WHERE TABLE_SCHEMA = SCHEMA()
 ORDER BY CREATE_TIME DESC
 LIMIT 1
+9
source

All Articles