表A的字段ID有很多类似:AA-060818-001 的字段,现在想把该字段改为:BB-060818-001,只是前面2个字符修改,如何实现??

解决方案 »

  1.   

    update table set filedsname='AA-060818-001'
      

  2.   

    update table set filedsname='BB-060818-001' where filedname='BB-060818-001'
      

  3.   

    update A set id = 'BB' || substr(id,3) where substr(id,1,2) = 'AA';
      

  4.   

    czbbbs(强弩) ( ) 信誉:100 -------------------
    楼上的正确!
      

  5.   

    update 表
    set 字段='BB'||ltrim(字段,'A')
    where substr(字段,1,2)='AA'update 表
    set 字段=replace(字段,'AA-','BB-')
    where substr(字段,1,2)='AA'
      

  6.   

    update A set id = 'BB' || substr(id,3) where substr(id,1,2) = 'AA';