There was a problem sending you an sms. Check your phone number or try again later.
We've sent a link to the Scribd app. If you didn't receive it, try again.
PL/SQL is Oracle\u2019s 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:
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
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.
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. See figure 1.
PL/SQL allows you to declare variables and constants. Variables are used to store values
temporarily. Variables and constants can be used in SQL and PL/SQL procedural
statements just like an expression.
PL/SQL allows control structures like IF statement, FOR loop, WHILE loop to be used in
the block. Control structures are most important extension to SQL in PL/SQL. Control
structures allow any data process possible in PL/SQL.
PL/SQL allows errors, called as exceptions, to be detected and handled. Whenever there is a predefined error PL/SQL raises an exception automatically. These exceptions can be handled to recover from errors.
PL/SQL allows process to be divided into different modules. Subprograms called as
procedures and functions can be defined and invoked using the name. These
subprograms can also take parameters.
A cursor is a private SQL area used to execute SQL statements and store processing
information. PL/SQL implicitly uses cursors for all DML commands and SELECT
command that returns only one row. And it also allows you to define explicit cursor to
deal with multiple row queries.
PL/SQL allows you to use SQL commands, function and operators. PL/SQL supports
data types of SQL.
PL/SQL also allows SQL statements to be constructed and executed on the fly. The
process of creating SQL statements on the fly is called as Dynamic SQL. This is different
from writing SQL commands at the time of writing the program, which is called as Static
Starting from Oracle8i, PL/SQL support native dynamic SQL, which makes
programming Dynamic SQL easier than its predecessor, where we used DBMS_SQL
PL/SQL block is sent as one unit to Oracle server. Without PL/SQL each SQL command
is to be passed to Oracle server, which will increase network traffic heavily. As a
collection of SQL statements is passed as a block to Oracle server, it improves
Applications written in PL/SQL are portable to any platform on which Oracle runs. Once you write a program in PL/SQL, it can be used in any environment without any change at all.
PL/SQL provides a variety of predefined datatypes, which can be divided into four
Represents a single value.
Composite Is a collection of components
Reference Is a pointer that points to another item.
Holds a lob locator.
The following are the datatypes in various categories
Note: There may be minor differences between PL/SQL datatypes and SQL datatypes
though they have the same name. For complete information about datatypes in PL/SQL
please see PL/SQL User\u2019s guide and Reference.
Now bringing you back...
Does that email address look wrong? Try again with a different email.