http://www.sd99.com/image/xiaoran/article/369.html去看了就知道怎么用了

解决方案 »

  1.   

    最后5条记录就是倒序排列后的前5条:SELECT * FROM tb_name ORDER by id DESC LIMIT 5;
      

  2.   

    select * from 表名 order by id desc limit 5;
      

  3.   

    大家说得很清楚了,不过这是limit是mysql专有的,其他数据库不支持。
      

  4.   

    倒数5条:
    select * from 表名 order by id desc limit 5;
    或select * from 表名 order by id desc limit 0,5;
    倒数3-倒数5条:
    select * from 表名 order by id desc limit 2,5;