Hello,
I'm writing a stored procedure. This procedure has a case where if it is met, I want to stop executing the procedure and return -1. How do I do this? Currently, I'm trying the following:
IF @result <> 1
BEGIN
SELECT -1
END
However, SELECT is not a typical "return". As you can imagine I spend most of my time in code which is why i'm looking for something like a "return".
Thank you,