Chapter 7. Advanced SQL

• TRIGGERS

• RECURSIVE SQL

• OUTER JOIN

• OLAP

• CASE EXPRESSIONS

• TYPED TABLES

• SUMMARY TABLES

• SEQUENCES

• ADVANCED FUNCTIONS

This chapter will cover some very powerful features found in DB2 SQL. Features, such as triggers, recursion, outer join, OLAP features, and uses of the case expression, will be discussed. In addition, we will discuss structured types, typed tables, user-defined functions, summary tables, sequences and some advanced functions.

Triggers

A trigger is a set of actions that will be executed when a defined event occurs. The triggering events can be the following SQL statements:

INSERT

UPDATE

DELETE

Triggers are defined for a specific table and once defined, a trigger is automatically active. ...

Get DB2® 9 for Linux®, UNIX®, and Windows®: DBA Guide, Reference, and Exam Prep, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.