开发者

MySQL - query for last created table

开发者 https://www.devze.com 2022-12-15 14:00 出处:网络
Is ther开发者_如何转开发e a query that will show the last created table in a database?Across all databases within your MySQL instance:

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
0

精彩评论

暂无评论...
验证码 换一张
取 消