Him
> Unless I'm missing something, option B _is_ multi-user safe.
> currval() doesn't return the "current" value of the sequence (like
> "select * from my_seq" would) -- it returns the last value that
> nextval() gave that session (hence, it isn't defined until that
> session does a nextval()).
>
Actually the issue is b) is multi-user safe
*if* you have an exclusive lock on the table. If you don't it is quite
possible for a user to insert an other record between your insertion and the
currval() call
David
--
****************************************************
David Horwitz University of Cape Town
IT Officer Private Bag
Multimedia Education Group Rondebosch
7701
dhorwitz@ched.uct.ac.za SOUTH AFRICA
Tel:+27 21 650 3841 Fax:+27 21 650 5045
http://www.meg.uct.ac.za
PGP key: http://www.meg.uct.ac.za/dhorwitz/david_horwitz.acs
*************************************************