Oracle 11g PL/SQL: Allow Sequences in PL/SQL Expressions
Yet Another Optimization or a Compiler Trick?
In Oracle 11g, Oracle finally allows PL/SQL developers to use sequences in PL/SQL expressions. Prior to that version developers should fetch the nextval or currval of a sequence by using a select … dual type of statements. By 11g you don’t need this anymore. You can simply refer to sequences anywhere you want within a PL/SQL expression.
In this paper you will find out basic usage example and whether this new syntax is a new PL/SQL optimization removing dual access necessity or it is only plastics.