Intro RW
Intro RW
Introduction
1 xx xxx xxx
xx xxx xxx 2 3 P
xx xxx xxx ----- --- ---
xx xxx xxx ----- --- ---
----- --- --- P
----- --- --- ----- --- ---
xx xxx xxx P
xx xxx xxx
----- --- ---
• Modularize code into subprograms.
1. Locate code sequences repeated more than once.
2. Create subprogram P containing the repeated code.
3. Modify original code to invoke the new subprogram.
• Create subprogram layers for your application.
– Data access subprogram layer with SQL logic
– Business logic subprogram layer, which may or
may not use data access layer
Anonymous blocks:
• Form the basic PL/SQL block structure
• Initiate PL/SQL processing tasks from applications
• Can be nested within the executable section of
any PL/SQL block
[DECLARE -- Declaration Section (Optional)
variable declarations; ... ]
BEGIN -- Executable Section (Mandatory)
SQL or PL/SQL statements;
[EXCEPTION -- Exception Section (Optional)
WHEN exception THEN statements; ]
END; -- End of Block (Mandatory)
sql
Oracle Server
SQL Statement Executor
Edit
Run