解决方案 »

  1.   

    去掉重复值,可以考虑使用 distinct 。
      

  2.   

    是类似这样的数据
    rowid      updatetime    批次号id
     1                 00.00              10
     2                 00.01              10
     3                 00.02              11
     4                 00.03              12
     5                 00.04              13
     6                 00.05              13
    我想把这样select出来的数据的 最后两个不要被select出来 因为我觉得最后两个数据可能会不全 
      

  3.   

    select * from 表 t
    where exists(select 1 from 表 where 批次号id>t.批次号id)
    order by 批次号id,updatetime
      

  4.   

    我不是按照批次号来选择的,批次号是什么我根本是不知道的,我选择的量是按照rownum来选择的
      

  5.   

    这里的rownum和rowid是啥
    最后的批次号不是最大的号吗
      

  6.   

    看的不是很明白,试试分析函数row_number() over()