|What it is||Single query or command execution||Full programming language|
|What it comprises||Data source for reports, web pages||Application language to build, format and display report, web pages|
|Characteristic||Declarative in nature||Procedural in nature|
|Used for||Manipulating data||Creating applications|
PL/SQL is a procedural language that has both interactive SQL and procedural programming language constructs such as iteration, conditional branching.
Go through this tutorial to learn more about PL/SQL.
PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in PL/SQL.
Master PL/SQL, in this PL/SQL certification training.
Learn Pl Sql in 14 hrs. Download e-book now
A PL/SQL program unit associated with a particular database table is called a database trigger. It is used for :
Compilation process includes syntax check, bind and p-code generation processes.Syntax checking checks the PL/SQL codes for compilation errors. When all errors are corrected, a storage address is assigned to the variables that hold data. It is called Binding. P-code is a list of instructions for the PL/SQL engine. P-code is stored in the database for named blocks and is used the next time it is executed.
Go through this tutorial to learn more about handling PL/SQL errors.
A PL/SQL package consists of
Check the insightful PL/SQL tutorial to learn more about Pl/SQL Packages.
It provides several benefits like
Tracing code is a crucial technique to measure the code performance during the runtime. Different methods for tracing includes
Function: The main purpose of a PL/SQL function is generally to compute and return a single value. A function has a return type in its specification and must return a value specified in that type.
Procedure: A procedure does not have a return type and should not return any value but it can have a return statement that simply stops its execution and returns to the caller. A procedure is used to return multiple values otherwise it is generally similar to a function.
Package: A package is schema object which groups logically related PL/SQL types , items and subprograms. You can also say that it is a group of functions, procedure, variables and record type statement. It provides modularity, due to this facility it aids application development. It is used to hide information from unauthorized users.
Download Pl Sql Interview questions asked by top MNCs in 2017 ?
A stored procedure is a sequence of statement or a named PL/SQL block which performs one or more specific functions. It is similar to a procedure in other programming languages. It is stored in the database and can be repeatedly executed. It is stored as schema object. It can be nested, invoked and parameterized.
Learn more about PL/SQL Collections & Records.
A cursor is a temporary work area created in a system memory when an SQL statement is executed.A cursor contains information on a select statement and the row of data accessed by it. This temporary work area stores the data retrieved from the database and manipulate this data. A cursor can hold more than one row, but can process only one row at a time. Cursor are required to process rows individually for queries.