if OBJECT_ID('tb') is not null
drop table tb
go
create table tb (cl char(50))
insert into tb select '2233939393333332333 ' union all
select '3332333333333443426 ' union all
select '2233939393333332333 ' union all
select '3334333333333333333 ' union all
select '3332333333333443426 ' union all
select '2233939393333332333 ' union all
select '3334333333333333333 ' union all
select '3332333333333443426 '
update tb set cl=replace(replace(replace(replace(REPLACE(cl,' ',''),char(9),''),char(10),''),char(13),''),CHAR(32),'')
select * from tb
cl
--------------------------------------------------
2233939393333332333
3332333333333443426
2233939393333332333
3334333333333333333
3332333333333443426
2233939393333332333
3334333333333333333
3332333333333443426
(8 行受影响)
如何去掉字符串后面空格
最新推荐文章于 2021-09-08 11:26:25 发布