时间字段 timeselect * from 
(select * from table_name where time>自己设置一个时间点 order by time)
where rownum=1

解决方案 »

  1.   

    select * from 
    (
    select rownum,* from table_name
    ) where rownum=(select count(*) from table_name)
      

  2.   

    楼上的写法是错的.
    你必须要给ROWNUM取个别名才能实施你的语句.select * from
    (
    select rownum rn,table_name.* from table_name
    ) where rn=(select count(*) from table_name)
      

  3.   

    也可以用LAST_VALUE()OVER()分析函数来做,不过就是不知道你要怎么分组和排序了.
      

  4.   

    谢谢各位,如果是用rownum来判断行号的话,这个rownum是不是要设置为自增的?但是如果设置自增,中间如果进行了删除操作,rownum中间肯定有断的。望各位赐教,分不够可以再加。