我有一个查询如下,以显示字符串@prodid= ''1,2,10,4,5,6,7,8,13,16,17,3''
中的'dbo.proudction @prodid= ''1,2,10,4,5,6,7,8,13,16,17,3'' ,@stock= 0'
:
declare @T table(Col1 varchar(100))
insert into @T values ('dbo.proudction @prodid= ''1,2,10,4,5,6,7,8,13,16,17,3'' ,@stock= 0')
select
substring(Col1, Start, Stop-Start)
from @T
cross apply
(select charindex('''', Col1)+1) c1(Start)
cross apply
(select charindex('''', Col1, Start)) c2(Stop)
你能帮我理解这个查询的工作吗?