I need to call stored procedure on SQL server and pass array of items. Example passing student info with multiple awards:
[awards]
id, description
1, Award 1
2, Award 2
3, Award 3
4, Award 4
5, Award 5
students:
id, first_name, last_name
I need to pass one student with multiple award ID's (this number can vary). The end result wold be as follow:
[students]
17, John, Doe [INSERTED]
[student_awards]
id, student_id, award_id
1, 17, 2 [INSERTED]
1, 17, 3 [INSERTED]
1, 17, 5 [INSERTED]
I am not asking for stored procedure - I can write it myself. I am asking help in understanding of a way to pass array with multiple award_id's.
Thank you!