Eg: Declare @Object2 Table(ID INT)
Declare @id int
insert into A.object (@id, 'name')
select @id = @@IDENTITY from A.object
insert into A.object2
OUTPUT INSERTED.ID into @Object2 -- Get the Inserted ID Value from Object2
VALUES (@id,'name2','additionalColumn')
-- Inserting the recently inserted PK value of Object2 to Object3
insert a.object3(@id,'name3','additional column')
[1]:
http://msdn.microsoft.com/en-us/library/ms177564.aspx
No one has followed this question yet.