How to unwrap PACKAGE BODY

Oracle provided various packages which contains utilities, management tools, system functionalities ... But most of them are encrypted , for example, select the package body of 'DBMS_FLASHBACK'

unwrapped package body

What is NEXTVAL in Oracle

In MySQL, you can specify a column as auto_increment, the value will increment 1 at each insert. SQL Server also provide similar thing. Oracle using SEQUENCE and NEXTVAL to do the job.

Create a SEQUENCE:

PL/SQL packages introduction

Oracle provide PL/SQL packages let you extend the database functionality . You can write you own package or utilize the packages shipped with Oracle release.Oracle supplies all kinds of packages, familiar with these packages is a must-have skill of DBA.

Packages is a collection of different program objects include procedures, functions, variables, constants, cursors, exceptions etc.

Oracle dual table

In Oracle, the dual table is a special kind of one-row and one-column database table. dual is a table which is created by oracle along with the data dictionary. It consists of exactly one column whose name is dummy and one record. The value of that record is X. Note that the outer query references the dummy table .

New Features of PLSQL in Oracle 11g

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

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: