O'Reilly logo

Oracle Database 10g: A Beginner's Guide by Michael Corey, Michael Abbey, Ian Abramson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CRITICAL SKILL 6.2

Describe the Basic PL/SQL Program Structure

The structure we use in PL/SQL is the foundation for all of the language. Once you’ve mastered it, you will then be able to move forward; however, if you do not take the time to get this first step right, your journey will be difficult. Thankfully, it’s quite simple.

The structure is quite basic. You will have areas for your program parameters (these are used to pass values from outside a program to the program itself), your internal variables, the main program code and logic, and various ways to deal with problem situations. Let’s look at the basic form of a PL/SQL block:

 [DECLARE]
    -- Put Variables Here
BEGIN
    -- Put Program Here
[EXCEPTION]
    -- Put exception handlers here
END;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required