store result of select query into array variable

Viewed 40750

I want to store the result of this sql query in variable @a. The result contains 17 rows. How to edit this code in order to store the rows in @a?

declare @a uniqueidentifier
select EnrollmentID into @a  from Enrollment
2 Answers
Related