Beruflich Dokumente
Kultur Dokumente
______________________
1.
What is a PL/SQL
****************
*************************************************
*************************************************
2.
About PL/SQL
************
PL/SQL :
1.Provides a Block structure for executable units of code.
2.Provides procedural constructs such as :
- Variables,constants and types
- Control structures such as conditional statements and loops
- Resuable program units that are written once and executed many times.
*************************************************
*************************************************
3.
PL/SQL Environment
******************
*************************************************
*************************************************
4.
Benefits of PL/SQL
******************
1.Integration
of procedural constructs with SQL
2.Improved Performance
3.Modularized program development
4.Integration with Oracle Tools
5.Portability
6.Exception Handling
*************************************************
*************************************************
5.
PL/SQL Block Structure
**********************
DECLARE (Optional)
-- Variables,cursors,user-defined exceptions
BEGIN (Mandatory)
-- SQL Statements
-- PL/SQL Statements
EXCEPTION (Optional)
-- Actions to perform when errors occur
END (Mandatory)
*************************************************
*************************************************
6.
Block Types
***********
1.Anonymous Blocks are unnamed blocks.These blocks are not stored in the database.
They are passed to the PL/SQL engine for execution at run time.
If you want to execute the same block again you have to rewrite the block.
*************************************************
*************************************************
7.
Program Constructs
******************
Tools Constructs :
1.Anonymous Block
2.Application procedures or functions
3.Application packages
4.Application triggers
5.Object types
*************************************************
*************************************************
8.
Create an Anonymous Block
*************************
BEGIN
DBMS_OUTPUT.PUT_LINE('Welcome to PL/SQL Programming');
END;
/
*************************************************
*************************************************
9.
Test the Output of a PL/SQL Block
*********************************
BEGIN
DBMS_OUTPUT.PUT_LINE('Welcome to PL/SQL Programming');
END;
/
*************************************************
*************************************************