查询数据表中最后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/seasondaily/p/9712097.html