environment sql server 2005
In my stored proc i am calling another stored proc to insert several rows into several tables. The last row inserted i want to pass the identity of that row to the original stored proc. I am doing this by using
return scope_identity(); My understanding is
return is only used for error messages/status codes. Is this a "good" way of doing what I need to do, or is there another "better" way?