mysql查询表中最后一条记录

阅读数:2201

查询全部的记录:            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;

猜你喜欢

转载自blog.csdn.net/qq_38922435/article/details/81266443