Batch updates with autoincrement?
Posted by: Robert Nicholson
Date: October 03, 2009 03:08PM

So whenever you have an approach where you either call the sequence (oracle) by trigger or use an autoincrement field and typically then need to walk the result set upon an insert to know the identity of the row you just inserted.

How do you reconcile that with bulk inserts? If you use bulk inserts there isn't anyway to obtain the identity of each inserted row. And you certainly don't want N roundtrips to the database in order to get a batch of id's. The only thing that leaves is configuring your sequence to give you N's whenever you ask for it's next value and then using those ids in each of your insert statements.

Options: ReplyQuote


Subject
Written By
Posted
Batch updates with autoincrement?
October 03, 2009 03:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.