Unique Numbers in Oracle and MySQL

LAST_INSERT_ID()

.nextval property. You can get the just-used value of that sequence by referencing its .currval

.nextval

DELETE

create sequence seq                                           --Oracle

SELECT seq.nextval FROM DUAL                                  --Oracle

.nextval

SELECT seq.currval FROM DUAL                                 --Oracle

LAST_INSERT_ID()

  1 comment for “Unique Numbers in Oracle and MySQL

  1. Ollie
    May 18, 2015 at 9:03 am

What do you think? Let me know!