select * from table order by time
查出来的 第一条,删除掉
请指教

解决方案 »

  1.   

    delete from table where time in (select time from table order by time where rownum=1)
      

  2.   

    order by  不能在 where之前吧
      

  3.   

    delete from table where time =(select top 1 time from table order by time )
      

  4.   

    晕了
    delete from table where time in (select min(time) from table)
      

  5.   

    hongqi162(失踪的月亮) 你写的太死了,如果删除最后 n条呢
      

  6.   

    to "divmedia()"  top 1应该不是 oracle的
      

  7.   

    DELETE FROM card_auth_error E WHERE rowid =(select min(t1.rowid) from card_auth_error t1, 
    (select min(calling_date) calling_date from card_auth_error t order by t.calling_date) t2 
    where t1.calling_date=t2.calling_date 
    group by t1.rowid)
      

  8.   

    上面那个group by 好像可以去掉
      

  9.   

    delete from table where time in 
    (
     select time from
     (
       select time from table order by time 
     )
     where rownum = 1
    )
      

  10.   

    楼上的兄台,如果time是主键那么你的sql没有问题,可是如果不是呢?改为下面就可以了:

    delete from table where rowid in
    (
    select rowid from
    (
    select time from table order by time
    )
    where rownum = 1
    );楼主问题解决了记得给分啊 。