27,580
社区成员
发帖
与我相关
我的任务
分享
select substring( bh , 1 , 1 ) + substring( bh ,3 , 1 ) from tab
create table tb(BH varchar(8))
insert tb select 'APT0_1'
union all select 'BPTO_2'
union all select 'APD0_3'
select stuff(left(BH,3),2,1,'') from tb
/*
(3 row(s) affected)
------
AT
BT
AD
(3 row(s) affected)
*/
drop table tb
--try
select stuff(left(BH,3),2,1,'') from tb
select left(bh,1)+substring(bh,3,1) from tab