So at the time of insertion we will provide some output parameter as
@ID AS INT
After insertion statement just write
SET @ID = @@IDENTITY
OR
SET @ID = SCOPE_IDENTITY()
OR
SET @ID = IDENT_CURRENT
above all returns value inserted into identity columns.
No comments:
Post a Comment