Oracle released its 11g Database, it introduced a number of new features and improvement for PL/SQL.

Enhancement to regular expression

A new built-in function REGEXP_COUNT available in PLSQL of Oracle11g. It match a regular expression pattern and return the number of matches. Here is an example:

 
SELECT REGEXP_COUNT ('This is an example of REGULAR_COUNT' , 'is', 1, 'i') FROM dual;
REGEXP_COUNT ('THIS IS AN EXAMPLE OF REGULAR_COUNT' , 'IS', 1, 'I')
-------------------------------------------------------------------
                                                                  2
 

The first parameter is subject, 'is' is the pattern , 1 means start position of the search, 'i' indicate its case insensitive.

SIMPLE_INTEGER, SIMPLE_FLOAT, and SIMPLE_DOUBLE Datatypes

These types are subtypes of PLS_INTEGER, BINARY_FLOAT, and BINARY_DOUBLE. When PLSQL_CODE_TYPE is set to NATIVE, these subtypes gain significant performance improvements because the calculation was done at the hardware level.

 
DECLARE
  v_pls_value1    PLS_INTEGER := 0;
  v_pls_value2    PLS_INTEGER := 1;
  v_simple_value1 SIMPLE_INTEGER := 0;
  v_simple_value2 SIMPLE_INTEGER := 1;
  -- Following are used for elapsed time calculation
  -- The time is calculated in 100th of a second
  v_start_time    NUMBER;
  v_end_time      NUMBER;
BEGIN
  -- Perform calculations with PLS_INTEGER
  v_start_time := DBMS_UTILITY.GET_TIME;
  FOR i IN 1..50000000 LOOP
    v_pls_value1 := v_pls_value1 + v_pls_value2;
  END LOOP;
 
  v_end_time := DBMS_UTILITY.GET_TIME;
  DBMS_OUTPUT.PUT_LINE ('Elapsed time for PLS_INTEGER: '|| (v_end_time - v_start_time));
 
  -- Perform the same calculations with SIMPLE_INTEGER
  v_start_time := DBMS_UTILITY.GET_TIME;
  FOR i IN 1..50000000 LOOP
    v_simple_value1 := v_simple_value1 + v_simple_value2;
  END LOOP;
  v_end_time := DBMS_UTILITY.GET_TIME;
 
  DBMS_OUTPUT.PUT_LINE ('Elapsed time for SIMPLE_INTEGER: '|| (v_end_time - v_start_time));
END;
 

You can see the different performance between the two types

 
Elapsed TIME FOR PLS_INTEGER: 147
Elapsed TIME FOR SIMPLE_INTEGER: 115
PL/SQL PROCEDURE successfully completed.
 

Continue Statement

Continue allow you exit from current iteration and pass the control to next iteration.

Sequences in PLSQL expression

Its improved base on CURRVAL and NEXTVAL, example

 
 
CREATE OR REPLACE SEQUENCE test_seq START WITH 1 INCREMENT BY 1;
 
SET SERVEROUTPUT ON
DECLARE
  v_seq_value NUMBER;
BEGIN
  FOR i IN 1 .. 300 loop
  v_seq_value := test_seq.NEXTVAL;
 
  DBMS_OUTPUT.PUT_LINE ('v_seq_value: '||v_seq_value);
  END loop;
END;
/