Is it possible to make an Update query right after Insert returned new Id's I am using MS Sql Server 2008R2.

For example I need to insert many rows inside TableA and I want to make an Update another TableB with newly inserted Ids from TableA.

Is it possible to do in one SQL query?
OUTPUT Clause

DECLARE @MyTableVar table( NewScrapReasonID smallint,
                           Name varchar(50),
                           ModifiedDate datetime);
INSERT Production.ScrapReason (Name, ModifiedDate)  
    OUTPUT INSERTED.ScrapReasonID, INSERTED.Name, INSERTED.ModifiedDate
        INTO @MyTableVar
VALUES (N'Operator error', GETDATE());


you can then use table for other inserts / updates