in reply to Re: Generating portable SQL primary key sequences
in thread Generating portable SQL primary key sequences
With Oracle it is:SELECT currval('table_key_seq')
Both of them can use sequences for the default value on the primary key. This makes the usage model the same as MySQL or SQL Server of insert the row without the key, and fetch the just-inserted value of the key.SELECT table_key_seq.currval FROM dual
|
|---|