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:
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.
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 .
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: