Select from following answers:- LAST_INSERT_ID()
- SCOPE_IDENTITY()
- IDENT_CURRENT()
- @@IDENTITY
- All Above
LAST_INSERT_ID() can be used to fetch latest autoincrement Id being used in any INSERT query that was just got executed.
SELECT LAST_INSERT_ID();
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator