Hello,
Seems that Oracle 12c introduces IDENTITY columns based on SEQUENCES that are created automatically...
The sequence gets a name like ISEQ$$_<number>
I was wondering if it's possible to find the name of the sequence created for a given table.
We need that to query the last generated number, by doing:
select <seqname>.currval from dual
Or is there another way to find the last generated number for the current SQL session???
Thanks!
Seb
SQL> create table t1 ( key integer generated by default as identity, c char(10) );
Table created.
SQL> select sequence_name from all_sequences where sequence_name like 'ISEQ%';
SEQUENCE_NAME
--------------------------------------------------------------------------------
ISEQ$$_93989
ISEQ$$_93991
ISEQ$$_93993
ISEQ$$_93995
ISEQ$$_93997
ISEQ$$_94107
6 rows selected.