Basic Point of PL/SQL

Total Blog Views: 70

Blog Status: publish

Created By: vishnu Created at: 08-20-2021

Tags: basicprogramming shadbox ShadBox Hiring coding coder PL/SQL

Important Points

  • PL/SQL has three parts declaration section, execution section and exception Handling section.

  • "SET serve output ON" is always written before starting of PL/SQL.

  • If exit is not written with WHEN, than loop is executed only once.

  • Cursor can control more than one rows. But exection of only one row is possible at a time.Group of all rows which are controlled by cursor is called active set.

  • Difference between function and procedure is this-function always has only one value but procedure can have it or not.

  • Trigger is used automatically when DML statement are executed.

Meaning of PL/SQL is the extension of procedural language. Its main point are based on SQL. It is developed by Oracle company, which is responsible for it's extension & enhancement.

Simple PL/SQL Block-

       It is manily formed by SQL and PL/SQL statements. It is used in PL/SQL program.

Three parts of PL/SQL are-

            Declaration part (not necessary)

            Execution part (necessary)

            Exception handing (error part, not necessary)

Declaration part of PL/SQL- This part which is not necessary stars with reserved keyword DECLARE. Aim of this part is to declare constants records, variable and cursor's. These all placeholders are used to exchange data in execution part . placeholder (constants, variable and records) collects data temporaily Cursor are also declare in this section

Execution section- This Part of PL/SQL which is not necessary,starts with reserved, keyword EXCEPTION. It is used to manager errors (exception) in the program.

Structure of PL/SQL Block-

DECLARE

             Variable declaration

BEGIN

             Program Execution

Exception

             Exception handling

END;

General block of PL/SQL program which represent word "BHARAT"

SQL>set serveroutput on

1 SQL> begin

2 dbms_output.put_line("BHARAT");

3 end;

4 /

BHARAT

Procedure of PL/SQL is completed successfully

Some important points of PL/SQL program is as follows-

  • Parts of program block of PL/SQL begins with keyword BEGIN and ends with keyword 'END' is know as executable part of PL/SQL structure.
  • PL/SQL program structure is formed by many statements. Each statement ends with semicolon(;)
  • At the end of PL/SQL program structure forward slash (/). Which is responsible for execution of program structure statements.

Benifits of PL/SQL-

       Formation of PL/SQL structure-In PL/SQL , structure of program can be written with each other, it is nesting. Each structure is responding for small or large part of whole work (task). Structure of PL/SQL is stored in data base and can be reused.

       Better representation-PL/SQL engine excutes many SQL statement as network traffic.

       Capability or procedural language-To make PL/SQL more powerful, construct of some procedural language are used like if else & for loops.

      


vishnu

I'm doing Collage Study Right Now and Make Blog About information technology & Info. Programming Share my blogs and comment on it Give me more suggestion on it!



Comments



  • asad | almost 4 years ago
    Nice information, if possible share more content on PL/SQL.
    • vishnu | almost 4 years ago
      Thanks For Reply i write 2nd part of PL/SQL Keep waiting Pls Share Like & Comment
    • vishnu | almost 4 years ago
      Hy Dude Thanks for Supporting so I edit this blog and write more content about PL/SQL
  • swazahmad | almost 4 years ago
    Awesome content vishnu
    • vishnu | almost 4 years ago
      Thanks Buddy
Buy traffic for your website

About Shadbox

we have the “Get things executed” lifestyle at our place of work. There are not any excuses, no if’s or however’s in our dictionary. committed to navigating the ship of creativity to create cell answers, we resolve the real-lifestyles troubles of our clients and their clients. Our passion for work has won us many awards, year after 12 months.

Services

Downloads