update tbName set col=replace(col, 'abc', 'bcd') where charindex('abc', col)=1
create table T(col varchar(10)) insert T select 'aaadd' union all select 'bbbfd' union all select 'abcdf'update T set col=replace(col, 'abc', 'bcd') where charindex('abc', col)=1select * from T--result col ---------- aaadd bbbfd bcddf(3 row(s) affected)
update tbName set col=replace(col, 'abc', 'bcd')
where charindex('abc', col)=1
create table T(col varchar(10))
insert T select 'aaadd'
union all select 'bbbfd'
union all select 'abcdf'update T set col=replace(col, 'abc', 'bcd')
where charindex('abc', col)=1select * from T--result
col
----------
aaadd
bbbfd
bcddf(3 row(s) affected)