New PL/SQL Feature in Oracle 11g: the use of sequence.nextval 13422386 1019544571447648 7687716130941590224 o1

New PL/SQL Feature in Oracle 11g: the use of sequence.nextval

Another small new feature in Oracle 11g PL/SQL: you can directly use sequence.nextval (and sequence.currval). It is not necessary anymore to do something like select sequence.nextval into l_seq from dual in your PL/SQL block. A small example: 

declare
  l_seq number;
begin
  l_seq := oe.orders_seq.nextval;
  dbms_output.put_line('Value of orders_seq.nextval = '||to_char(l_seq));
end;

SQL>

Value of orders_seq.nextval = 1000

PL/SQL-procedure is geslaagd.

4 Comments

  1. Asif Momen September 25, 2007
  2. Asif Momen September 24, 2007
  3. Karl July 19, 2007
  4. Patrick Sinke July 13, 2007