我还是不会用
create table #(telno varchar(20),telno1 varchar(20))
insert into #(telno)
select '13512345678'
union all select '78455646'
union all select '86+13178547213'
update #
set telno1 = stuff(telno,len(telno)/2 - 1,4,'****')
from #
select * from #
drop table #
create table #(telno varchar(20),telno1 varchar(20))
insert into #(telno)
select '13512345678'
union all select '78455646'
union all select '86+13178547213'
update #
set telno1 = stuff(telno,len(telno)/2 - 1,4,'****')
from #
select * from #
drop table #
create table #(telno varchar(20))
insert into #(telno)
select '13512345678'
union all select '78455646'
union all select '86+13178547213'
update #
set telno = stuff(telno,len(telno)/2 - 1,4,'****')
from #
select * from #
drop table #