|
|
|
Oracle:
Oracle Database PL/SQL Program Constructs
This
tutorial introduces the architecture of the
PL/SQL language as describes how PL/SQL
shares common language structure with other
procedural languages. The use of PL/SQL as
an internal Oracle language will also be
introduced, and the use of interpreted and
compiled PL/SQL will be discussed.
This
tutorial begins with a discussion of PL/SQL
encapsulation and shows anonymous code
snippets, stored procedures, functions and
packages. The student will learn how to
create and de-bug PL/SQL and how to use the
SHOW ERRORS command to display PL/SQL
parsing errors. The student will also be
exposed to run-time PL/SQL errors, and learn
how to use the EXCEPTIONS clause to trap
expected database errors.
The student
will also see how to implement PL/SQL
looping structures and see how to use PL/SQL
to create FOR loops, WHILE loops and
REPEAT-UNTIL loop structures. The student
will also learn the DECLARE sections of
PL/SQL and understand how to create program
variables and array variables. The student
will also learn how to assign database
values to variables.
This
tutorial is heavy or reading, but it is
necessary for you to get the overall
concepts before we start coding PL/SQL
programs.
Special
Note:
The next
three tutorials will focus on PL/SQL coding,
and the use of PL/SQL to solve business
problems. To get the most from your
readings, you are highly encouraged to
work-along with the Feuerstein book, writing
PL/SQL snippets. The best way to learn any
computer language is to use it, and the more
hands-on practice you get, the better you
will internalize the concepts.
You may
wish to subscribe to the Feuerstein book
online so that you can cut and paste PL/SQL
directly into your Oracle system. You can
subscribe to Oracle PL/SQL by going to
www.safari.oreilly.com.
I like to
use the analogy of a swimming class. You can
attend lectures on swimming, but you learn
to swim by diving into the pool. So, let’s
dive into the pool and start coding with
PL/SQL.
Learning
Outcomes
Upon
completion of this tutorial, you will be
able to:
-
Learn
basic PL/SQL structure
-
Describe Boolean logic in PL/SQL
-
Declare
and use program variables
-
Define
and use cursors
-
Use
looping constructs in PL/SQL
-
Perform
assignment statements in PL/SQL
Note: These exercises may use the
pubsdb.sql script that can be
downloaded at this link.
|
|
|
|
|
|
| |
Burleson is the American
Team

BC
Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Remote DBA
Remote DBA Services
Copyright © 1996 -
2010 by Burleson Enterprises, Inc. All rights reserved.
Oracle® is the registered trademark of Oracle Corporation.
|
|