It was pointed out to me:

>Oracle:
>> $dbh->do(CREATE SEQUENCE table_uid_seq START WITH 1 INCREMENT BY 1)
>> $dbh->do(CREATE TABLE table ( uid NUMBER(10) PRIMARY KEY ... ))
>> $dbh->do(INSERT INTO table (table_uid_seq.NEXTVAL, field...) VALUES (...))


>meanwhile someone else inserts some records.


>>> $dbh->...(SELECT table_uid_seq.CURRVAL AS unique_id FROM DUAL)
>

>not the correct value i fear. 
>just 0.002$
>Li

In my application I have a lock applied during the insert and select, so it's 
no problem for me.  I neglected to mention that.




Reply via email to