Objectives:
  After completing this course the student should be able to:
  • Develop triggers, stored procedures and user defined functions
  • Code SQL/PL statements
  • Use the DB2 command tools
Target Audience:
  DB2 programmers, users and data designers who are responsible for DB2 applications
Prerequisites
 
  • Relevant Operating Systems experience (AIX/UNIX/LINUX or Windows) along with knowledge of relational database theory and SQL.
  • Previous experience of SQL with DB2 or a similar relational database is required.
Duration
  One days.

Outline for DB2 SQL/PL Workshop

SQL Procedure Language

  • Defining SQL Procedures
  • SQL PL Statements
  • COMPOUND Statement
  • Declare statement
  • Error Handling
  • Assignment (SET) Statement
  • CASE statement
  • IF and GOTO statements
  • LOOP, LEAVE and ITERATE Statements
  • REPEAT and WHILE Statements
  • FOR Statement
  • GET DIAGNOSTICS Statement
  • RETURN Statement
  • SQL Procedure Examples

Creating SQL PL Objects

  • SQL stored Procedures
  • Creating SQL Procedures
  • Create SQL Procedure Steps
  • Effects from CREATE
  • SQL FUNCTIONS
  • Triggers