What is PL/SQL?

What is PL/SQL?

PL/SQL is Oracle’s procedural language extension to SQL.  PL/SQL allows you to mix SQL statements with procedural statements like IF statement, Looping structures etc.  PL/SQL is the superset of SQL. It uses SQL for data retrieval and manipulation and uses its own statements for data processing.

PL/SQL program units are generally categorized as follows:

q  Anonymous blocks

q  Stored procedures

Anonymous block

This is a PL/SQL block that appears within your application. In many applications PL/SQL blocks can appear where SQL statements can appear.  Such blocks are called as Anonymous blocks.

Stored Procedure

This is a PL/SQL block that is stored in the database with a name. Application programs can execute these procedures using the name.  Oracle also allows you to create   functions, which are same as procedures but return a value, and packages, which are a collection of procedures and functions.

PL/SQL Engine

Every PL/SQL block is first executed by PL/SQL engine. This is the engine that compiles and executes PL/SQL blocks.   PL/SQL engine is available in Oracle Server and certain Oracle tools such as Oracle Forms and Oracle Reports.

PL/SQL engine executes all procedural statements of a PL/SQL of the block, but sends SQL command to SQL statements executor in the Oracle RDBMS.  That means PL/SQL   separates SQL commands from PL/SQL commands and executes PL/SQL commands using Procedural statement executor, which is a part of PL/SQL engine.

Advertisements

About Oracle Technology Blogs
Oracle Application Development

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: