查询一个表中最后5条数据
select * from (select * from emp t order by t.id desc) demp where rownum<6
如果有一个自增id,利用select * from 表名 order by id desc limit 5 也可以实现
查询一个表中最后5条数据
select * from (select * from emp t order by t.id desc) demp where rownum<6
如果有一个自增id,利用select * from 表名 order by id desc limit 5 也可以实现
转载于:https://www.cnblogs.com/slhs/p/9712097.html