Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Can I return an identity value to be used in an insert trigger on a table? Expand / Collapse
Author
Message
Posted Wednesday, February 6, 2013 2:50 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 23, 2014 11:49 AM
Points: 7, Visits: 27
Thanks for your help.
I'll admit the 'join' is much cleaner than the 'select'.

However, is this saving me an I/O to the database?

I was hoping that returning the identity value from the insert to the parent table, and using it as the data to update the child table would save me I/O.

Or is an I/O performed because the parent and child inserts are in the same transaction?
Post #1416745
Posted Wednesday, February 6, 2013 3:31 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 23, 2014 11:49 AM
Points: 7, Visits: 27
oops, dup.
Post #1416754
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse