Here\'s a very simple question. I have an SP that inserts a row into a table and at the end there\'s the statement RETURN @@IDENTITY. What I can\'t seem to find is a way to
One point to mention. You should really use SCOPE_IDENTITY to return the identity value after INSERT. There is potential for @@IDENTITY to return the wrong value. Especially if TRIGGERS are in use, writing value to other tables after INSERT.