可以在存储过程中使用类似数组的东西去存储一个数据么 select a.EstimateContent,a.FKAbilityProjectID
from estimate_project a ,semester_course_ships b
where a.FKCourseID = '068bbb85-c8f9-4691-945d-09462170dd0c' and a.FKCourseID= b.PKSemesterCourseID and b.FKCourseID = '4ad0e6dc-cc57-4131-9415-50decd8b51eb'
and a.FKAbilityProjectID='010101'
----这是我要查询的代码,a.FKAbilityProjectID的值在下面那段SQL中取出来
select PKAbility_ProjectID from ability_project where ParentID in(select PKAbility_ProjectID from ability_project where Levels=2
and ParentID in (01)) and Levels=3 --值为(010101,010102,010201,010202)
SET @json = '[' + STUFF(
(SELECT ',{"PKAbility_ProjectID":"' + PKAbility_ProjectID + '"}'
FROM ability_project
WHERE ParentID IN ( SELECT PKAbility_ProjectID
FROM ability_project
WHERE Levels = 2
AND ParentID IN ( 01 ) )
AND Levels = 3 --值为(010101,010102,010201,010202)