PL/SQL Introduction

PL/SQL Introduction:

  •  PL/SQL is the procedural language which is used in oracle platform. 
  •  PL/SQL enables program or Application developers to combine SQL with procedural statements.

 PL/SQL Block contains four sections,

   1. Declare(Optional)

   2. Begin(Mandatory)

   3. Exception(Optional)

   4. End(Mandatory)



      Declaration statements ;


      Executable statements ;


     Exception handling statements ;





    v_count number;


       select count(*) into v_count

       from emp;


      when SQL%Notfound then

            Dbms_Output.Put_line('No data found');





·       Declare section starts with DECLARE keyword in which constants, variables, cursors can be declared which stores data temporarily.

·       This Declare section is optional.


·       Execution section starts with BEGIN and ends with END Keyword. program logic to be written here to perform any task, it support all

·       DDL, DML commands ,condition expressions etc.This section is Mandatory.


·       It starts with Exception keyword. which is used to handle the run time errors in the executable section. This section is optional.

PL/SQL Main concepts:

  1. Procedures

  2. Functions

  3. Packages

  4. Triggers

  5. Cursors

  6. Exception handling




No comments:

Post a Comment

Popular Posts

Search This Blog

Powered by Blogger.

Blog Archive

Service Support

Need our help to Learn or Post New Concepts Contact me

Blog Archive

Recent Posts

Service Support

Need our help to Learn or Post New Concepts Contact me