I have a query in a store procedure like this:
CREATE PROCEDURE DELETEREP (@id INT)
AS
DELETE FROM TABLE
WHERE ID = @id
Now I want to execute this store procedure from another stored procedure like this:
exec(Deleterep) from here i want to pass multiple ids like
where id in (selec id from table2)
I want to pass multiple ids to the SP. I don't want to call store procedure multiple time, using cursor or loop, I want to avoid it.
Can someone give me an idea of how to proceed?