Summary


SQL procedures are defined using the CREATE PROCEDURE statement. The statement defines the name, the parameters, and several other properties of the procedure.

The SQL procedure logic is defined in the procedure body of the CREATE PROCEDURE statement. The body is typically a compound statement consisting of declarations followed by procedural statements. The DECLARE statement is used to declare variables, their data type, and optionally, a default value. Statements such as SET, SELECT...INTO, and VALUES can also be used to assign values to variables.

This chapter demonstrated creation of simple procedures with some basic procedural statements. Other SQL PL statements will be discussed in detail in the rest of this book.



    DB2 SQL PL. Deployment and Advanced Configuration Essential Guide for DB2 UDB on Linux., UNIX, Windows, i5. OS, z. OS
    Intelligent Enterprises of the 21st Century
    ISBN: N/A
    EAN: 2147483647
    Year: 2003
    Pages: 205

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net