就两个字段吗?
update test set  starttime = decode(starttime,'2345','9999',starttime),endtime =decode(endtime ,'2345','9999',endtime);
如果想提高速度,加个条件!或者分两句话写!

解决方案 »

  1.   

    update test set   decode(starttime,'2345','9999',starttime),endtime =decode(endtime ,'2345','9999',endtime)
    where '2345' in (starttime,endtime);
      

  2.   

    oracle和sql server 通用版update test set starttime=case starttime when 2345 then 9999 else starttime end,
                          endtime=case endtime when 2345 then 9999 else endtime end
    where starttime=2345 or endtime=2345
      

  3.   

    ORARichard(没钱的日子......) 的方法可行
      

  4.   

    多字段
    create table test1(starttime int,endtime int)
    insert into test1 select 1234,2345
                 union all select 2345,4566
                 union all select 4566,1245
                 union all select 1245,1234