PL/SQL (Procedural Language/Structured Query Language) is Oracle’s proprietary server-based proceduralextension to the SQL database language.The PL/SQL and SQL languages are tightly integrated.PL/SQL supports all the SQL datatypes and the non-value NULL
.PL/SQL is a block-structured
language.
Main Features of PL/SQL
- Variables and constants.
- PL/SQL allows you to declare and use variables and constants in sql
as well as the procedural statements.
- PL/SQL allows you to declare and use variables and constants in sql
- Cursors
- A PL/SQL construct called a cursor that
runs through the tuples of some relation.. There are two kinds of cursors: implicit
and explicit. PL/SQL implicitly declares a cursor
for all SQL data manipulation statements, including queries that return only
one row. For queries that return more than one row, you can explicitly
declare a cursor to process the rows individually.
- A PL/SQL construct called a cursor that
- Control Structures
- Control structures allows to to control conditional, iterative, and
sequential flow of statements. - Conditional Control –
IF-THEN-ELSE
- Iterative
Control –LOOP-END
,
LOOPFOR -LOOP
,WHILE-LOOP
- Sequential control
- Control structures allows to to control conditional, iterative, and
- Modularity
- Successive refinement will reduce a complex problem to a set of simple problems. PL/SQL meets this need with program units. PL/SQL provides the package, procedures and functions, those allows you to group related program items into larger units.
- Data abstraction
- Data abstraction is achieved in PL/SQL through proper data structure implementations.There are different approaches to achieve this,
- Collections
- Records
- Object Types
- Information hiding
- Achieved through Packages,procedures,functions etc.
- Error Handling.
- PL/SQL makes it easy to detect and process predefined and user-defined
error conditions called exceptions. When an
error occurs, an exception is raised.
- PL/SQL makes it easy to detect and process predefined and user-defined
Nice article.Please try to include more examples.