mysql查询表中最后一条记录

180it 2021-06-13 PM 1116℃ 0条

mysql查询表中最后一条记录

查询全部的记录: select * from test_limit ;

查第一条记录: select * from test_limit limit 1;

查前面两条记录: select * from test_limit limit 0,2;

查第二和第三条记录: select * from test_limit limit 1,2;

查最后一条记录: select * from test_limit order by id DESC limit 1;

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

mysql查询表中最后一条记录