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;
1 个解决方案
#1
1
Instead of LIMIT 1, use LIMIT 1,1 this will give your second last created table
而不是LIMIT 1,使用LIMIT 1,1这将给你的第二个最后创建的表
#1
1
Instead of LIMIT 1, use LIMIT 1,1 this will give your second last created table
而不是LIMIT 1,使用LIMIT 1,1这将给你的第二个最后创建的表