Is there a way to have multiple updates in one stored procedure! I have ten update statements that need to be executed based on the parameters that are passed! Can this be done in one stored procedure?
create procedure p(@nv1 varchar(20),@pk1 int,
@nv2 varchar(20),@pk2 int)
as
set nocount on
update t1 set c1 = @nv1 where pk = @pk1
update t2 set c2 = @nv2 where pk = @pk2
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.