Connecting Tech Pros Worldwide Help | Site Map

Oracle 11g New Features.-II

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,500
#1   Aug 8 '07
PL/SQL: Sequences
================
In Oracle, the sequences object provides a sequential series of numbers to applications without the overhead of disk I/O or transaction locking. These values are often used for primary and unique keys.

In the previous release of Oracle Database, You can refer the sequence values in SQL statements with following pseudocolumns:

CURRVAL
returns the current value of a sequence.

NEXTVAL
increments the sequence and returns the next value.

Example:

SELECT employeeid.NEXTVAL
INTO l_employeeid
FROM DUAL;

But setback was that these pseudocolumns cannot be used directly in PL/SQL.

Some time this can be quite irritating from programmer’s point of view.

In Oracle Database 11g, it is now possible to simply use the pseudocolumns CURRVAL and NEXTVAL in a PL/SQL expression.

Example:
=============
l_employeeid := employeeid.NEXTVAL;


Oracle 11g New Features
======================
New PL/SQL features introduced in Oracle 11g include
1.Automatic subprogram inlining
2.A continue statement
3.A cross-session PL/SQL function result cache
4.Dynamic SQL enhancements
5.Mixed, named, and positional notation SQL calls
6.A multiprocess connection pool
8.A PL/SQL Hierarchical Profiler
9.That the PL/SQL Native Compiler now generates native code PL/Scope
10.Regular expression enhancements(introduces the REGEXP_COUNT function)
11.A SIMPLE_INTEGER datatype
12.Direct sequence calls in SQL statements



Reply


Similar Oracle Database bytes