Using Oracle 12c I definedĀ an identity column:
create table test(col1 number generated by default as identity (start with 1 increment by 1), col2 varchar2(100));
Oracle then generates a sequence for my identity column automatically.
Is there a way (function/call/etc..) to access the CURRVAL / NEXTVAL for that sequence given I don't have the sequence name? (without having to query the system catalog).
I'm trying to avoid the manual creation of a sequence for each of the tables that need auto-numbering and let Oracle administer automatically the sequence creation but I need access to the number just inserted in my identity column when inserting in the row, basically the CURRVAL. Looking forward to use IDENTITY columns...
thank you!