Do stored procedures need transactions?
Posted on 2011-09-21
If I want everything in a stored procedure to roll back if any part fails, does it need begin/commit transaction?
Also, if I insert into tableM and just after need the indentity value from that insert, is @@IDENTITY the correct way to get it? @@IDENTITY will get the last indentity value on any connection so I'm not sure about using it. But does being in a sproc or transaction make a different?