I have a scenario where I'd like to create a stored procedure that takes a list of integer ids as input. The procedure needs to update two tables with each id and if either update fails, then the update should fail completely for that id. I'd like to be able to return a list of all the ids that failed when the procedure is done. I know I can do transactions in a procedure to guarantee all-or-nothing success but I'm not sure if I can pass and return lists to a procedure. I looked around online but didn't find anything helpful