我现在的做法是:
declare @test varchar(50)
select @test from tbl_info where TEXT like '200%'
但是我查出来了之后就不知道该如何去更新了,所以想请教一个各位,多谢!

解决方案 »

  1.   

    update tbl_infor set [text]='1111'+[text] where [text] like '200%'
      

  2.   

    update tbl_infor set text='111'+text where text like '200%'
    or
    update tbl-infor set text='111'+text where left(text,3)='200'
      

  3.   

    哦,多谢两位醍醐灌顶。
    还有一个忘了问:就是如果我想把所有'100'开头的,在'100'后面加上'111',这个该如何做?
    更新后的表如下:
    ID   TEXT
    1    1001111
    2    1001112
    3    1112001
    4    1112002
    update tbl_infor set text=???+'111'+??? where text like '100%'
    多谢了!
      

  4.   

    i got it.
    update tbl_infor set text=substring(text,1,3)+'111'+substring(text,4,len(text)) where text like '100%'
    多谢各位了!