update 表 set 条形码='V0123900090454' where 条形码='V0123300090454'同理

解决方案 »

  1.   

    update 表名set 条形码= left(条形码,5)+'9'+right(条形码,len(条形码)-6) where ...
      

  2.   

    update tablename set 条形码=left(条形码,5)+'9'+right(条形码,8) where 
    条形码 in ('V0123300090454','V0123300090456')
      

  3.   

    update 表
    set 条形码= left(条形码,5)+'9'+right(条形码,len(条形码)-6)
    where 条形码 like 'V01233%'
      

  4.   

    create table ai( 编码  varchar(100),      条形码 varchar(100) )
    insert into ai select  'V01233000'   , 'V0123300090454'
    insert into ai select  'V01233000'  ,  'V0123300090456'
    insert into ai select  'V01233000' ,   'V0130700060446'
    insert into ai select  'V01307000' ,  'V0130700060448'update ai
    set 条形码=stuff(条形码,6,1,'9')goselect * from ai
    我这是把所有记录全部改啦
    要是有条件,你自己加上条件吧
      

  5.   

    LEFT
    返回从字符串左边开始指定个数的字符。RIGHT
    返回字符串中从右边开始指定个数的 integer_expression 字符。SUBSTRING
    返回字符、binary、text 或 image 表达式的一部分。