Just make a call to RETURN:
IF EXISTS (<some condition>)
BEGIN
// NEED TO STOP STORED PROCEDURE EXECUTION
RETURN
END
This will return the control back to the caller immediately – it skips everything else in the proc.
Just make a call to RETURN:
IF EXISTS (<some condition>)
BEGIN
// NEED TO STOP STORED PROCEDURE EXECUTION
RETURN
END
This will return the control back to the caller immediately – it skips everything else in the proc.