我有这个功能。
select * from dbo.flsSplitString('1,2,3',',')
它返回三行1、2和3,现在我声明了一个表变量
DECLARE @IDList TABLE
(
ID varchar(200)
);
现在,我必须将split函数返回的行插入表变量。函数可以根据要求返回尽可能多的行。我该怎么办?
可能是这样的
Insert Into @IDList (ID)
SELECT [value] -- Use the Column name returned from the SQL Function
FROM dbo.flsSplitString('1,2,3',',')
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句