查询一个表中最后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 也可以实现