Close
Set the last inserted Id to a variable so it can be used again
DECLARE @LastInsertedId int INSERT INTO Table (Name, Surname) VALUES (’Mike’,’Smith’); SET @LastInsertedId = Scope_Identity();
Copyright 2012. All rights reserved.