I have a stored procedure that should return an array of ids, depending on the result of a SELECT
query. How can I do this in SQL Server?
Here is my stored procedure:
ALTER PROCEDURE [dbo].[PS_testGar]
@CODE_B,
@ids OUTPUT
AS
BEGIN
SELECT @ids = code_gar
FROM [dbo].[GARANTIE]
WHERE CODE_B= @CODE_B
END