日期:2014-05-17 浏览次数:20666 次
if object_id('[tb]') is not null drop table [tb] go create table [tb]([col] varchar(7)) insert [tb] select '111.abc' union all select '222.abc' union all select '333.abc' union all select '444.abc' go update tb set col=replace(col,'.abc','') where charindex('.abc',col)>0 go select * from tb /** col ------- 111 222 333 444 (4 行受影响) **/