I have found that the CURRVAL function will return the last inserted id. Is that guaranteed? Is it based on the session. If another session inserts before you read CURRVAL, will you get that CURRVAL instead?
So, I guess what I am trying to say is that if I run
/*code copied from another listing*/ CREATE TABLE TEST (k serial, s integer) INSERT INTO TEST SET s = 1 SELECT TEST.CURRVAL FROM DUAL
is it guaranteed that it will return the id of the row that this chunk executed?
CURRVAL will return the last value *generated in this session*.
Daniel Dittmar
-- Daniel Dittmar SAP Labs Berlin [EMAIL PROTECTED]
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
