UPDATE tablename SET field = REPLACE(REPLACE(field,
CHAR(10), ''), CHAR(13), '')
char(10): 换行符
char(13): 回车符
select replace(replace(字段名称,chr(13),''),chr(10),'') from table_name
回车符的ASCII码13
换行是10
update table set fa=replace(fa,chr(13),'') --- 除去回车符update table set fa=replace(fa,' ','') --- 除去空格符
declare @str varchar(100)
set @str='dfd dfd df
dfdfd fdf
sdgdgd'
select replace(replace(@str,char(32),''),char(13)+char(10),'')
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)