SQThaal (11/2/2015)
Don't think the RETURN line is needed after RAISEERROR().
Yes it is required. You can raise an error and continue processing.
Here's a quick example.
if object_id('dbo.TryThis', 'p') is not null drop procedure dbo.TryThis;
go
create procedure dbo.TryThis
as
begin
print 'procedure started';
raiserror('error encountered', 16, 1);
print 'procedure finished';
end;
go
execute dbo.TryThis;