In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
CREATE PROCEDURE YourProc(@success bit) AS
UPDATE YourTable
SET Column1 = Value1
IF @@ROWCOUNT > 0
begin
-- Your Update statement updated at least one record.
@success =1
end
else
begin
-- Your Update statement did not return any records.
@success=0
end
SELECT @success
GO