MySQL - query for last created table
Is ther开发者_如何转开发e a query that will show the last created table in a database?
Across all databases within your MySQL instance:
SELECT *
FROM information_schema.TABLES
ORDER BY CREATE_TIME DESC
LIMIT 1
For the specific database you're connected to:
SELECT *
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = SCHEMA()
ORDER BY CREATE_TIME DESC
LIMIT 1
精彩评论