Hello.
v8.2
I've found that when I create a trigger no packages are created (at
least I can't find corresponding records in syscat.packages,
syscat.packagedep, syscat.trigdep).
Does it mean that static statements in triggers are not precompiled?
Or have I missed something?
Sincerely,
Mark B.
> Hello.
>
[quoted text clipped - 3 lines]
> syscat.packagedep, syscat.trigdep).
> Does it mean that static statements in triggers are not precompiled?
Correct.
Triggers are compiled into the SQL statement that causes the trigger to be
fired. After that, the DB2 optimizer kicks in and optimizes the overall
SQL statement (including triggers and SQL-bodied functions). The resulting
section is then executed.

Signature
Knut Stolze
DB2 Information Integration Development
IBM Germany
4.spam@mail.ru - 07 Jun 2006 14:10 GMT
Thanks, Knut.
> Correct.
>
> Triggers are compiled into the SQL statement that causes the trigger to be
> fired. After that, the DB2 optimizer kicks in and optimizes the overall
> SQL statement (including triggers and SQL-bodied functions). The resulting
> section is then executed.