Tagged: create sequence

Create Sequence-Oracle Database 12c

Database version : from Oracle Database 12cR1 Create sequence with session or global option When a sequence number is generated, the sequence is incremented, independent of the transaction committing or rolling back. SESSION option makes opportunity to create sequence that can used in association with global temporary table then its visibility is just for session. The following options CACHE, NOCACHE, ORDER, or NOORDER are ignored when SESSION is declared. 1) statement SQL> CREATE GLOBAL TEMPORARY TABLE glb_tmp_table (a number); Table created. SQL> CREATE SEQUENCE sq_sess SESSION; Sequence created. 2) Script execution SQL> INSERT INTO glb_tmp_table VALUES (sq_sess.NEXTVAL); 1 row created....