你要的结果好象没有什么规律,无法用SQL语句描述出来

解决方案 »

  1.   

    你的規則是什么呢?
    是特有的。
    select * from (select rownum num,dyu from 某表 order by num desc)where num between 1 and 5
    沒有錯。
      

  2.   

    sorry:
    select * from 
    (select dyu from 某表 order by num desc)where rownum between 1 and 5
      

  3.   

    就是整列数据按(rownum)倒序排列select * from (select rownum num,dyu from 某表 order by num desc)where num between 1 and 5是前5个倒排
      

  4.   

    暂时可应符你的需求,有可能会出错
    select * from (select dyu from 某表 order by rowid desc) where rownum<6
      

  5.   

    select * 
      from (select * from (select rownum num,dyu from 某表 ) order by num desc)
      where rownum between 1 and 5
      

  6.   

    在 SQL SERVER 有自增字段,不需要用到猥劣这么麻烦。