在MySQL中最后创建的表之前获取一个 [英] Get one before the last created table in MySQL
本文介绍了在MySQL中最后创建的表之前获取一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
找到了这段代码,可以给我提供最新创建的表格,但是如何获得它呢?
Found out this code to give me the lateset created table, but how can I get the one before it?
SELECT TABLE_NAME
FROM information_schema.tables
WHERE table_schema = 'data'
ORDER BY create_time DESC LIMIT 1;
推荐答案
而不是LIMIT 1,请使用LIMIT 1,1,这将为您创建倒数第二个表
Instead of LIMIT 1, use LIMIT 1,1 this will give your second last created table
这篇关于在MySQL中最后创建的表之前获取一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文