I have a stored procedure that makes an insert into a database. Something like
My questions: 1. is it worth to use transactions with this kind of stored proc ?
2. If i want to exit a stored procedure i should type return
In some cases i saw "return" followed by a number: return 11 or return 10...
Is there any use for that number ?
Code:
create proc InsAgent
@Name varchar(100),
@Age varchar(10),
@Message varchar(100) output
as
insert into Agent values(@Name,@Age)
set @Message=Success
My questions: 1. is it worth to use transactions with this kind of stored proc ?
2. If i want to exit a stored procedure i should type return
In some cases i saw "return" followed by a number: return 11 or return 10...
Is there any use for that number ?