I would say that you should use SCOPE_IDENTITY() , because @@identity will return the identity of the last thing inserted (which might not be your stored procedure if multiple requests are running at the same time).
You also need to select it, not RETURN it.
ExecuteScalar will return the first column value from the first row of the result set.
So...
SELECT SCOPE_IDENTITY();
probably more than what you want.
source share