34,590
社区成员
发帖
与我相关
我的任务
分享
select substring(zd,charindex('[',zd)+1,charindex(']',zd)-charindex('[',zd)-1) from tb
create table tb(zd varchar(20))
insert into tb select '123[difs]'
go
select substring(zd,charindex('[',zd)+1,charindex(']',zd)-charindex('[',zd)-1)
from tb
/*
--------------------
difs
(1 行受影响)
*/
go
drop table tb
select substring(zd,charindex('[',zd)+1,charindex(']',zd)-charindex('[',zd)-1)
from tb