---
title: "More on SQL Triggers in DB2 Context"
description: "SQL triggers additional points useful for db2 database developers"
url: https://srinimf.com/2012/04/01/db2-triggers-part-2/
date: 2012-04-01
modified: 2026-10-05
author: "Srini"
categories: ["DB2"]
tags: ["Triggers"]
type: post
lang: en
---

# More on SQL Triggers in DB2 Context

Triggers is such an important concept. It comes under server programming bucket.

– Three important functions Triggers will do are I-U-D (Insert, Update, Delete).

[![DB2 Triggers](http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&Format=_SL160_&ASIN=0738496561&MarketPlace=US&ID=AsinImage&WS=1&tag=mainframesrin-20&ServiceVersion=20070822)](http://www.amazon.com/gp/product/0738496561/ref=as_li_tf_il?ie=UTF8&tag=mainframesrin-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0738496561)

A mastering guide is IBM Redbook:

– Trigger will be created by [CREATE TRIGGER](https://srinimf.com/2013/01/05/what-is-new-in-db2-v10-part-1/)

– Before SQL operation starts a Trigger will execute first

– A trigger referential constraints and [check constraints](https://srinimf.com/2015/09/17/4-types-of-triggers-in-db2/) the data before it is actually updating into tables. It maintains data integrity

– It will also work on Non data base operations defined in UDF(user developed functions)

**Who creates Triggers:**

These are critical to business. A small mistake takes to cost more. So an Admin will create Triggers.

“DB2 Control center” is user-friendly, we can create Triggers by using it. Apart from this we can also create triggers in ZOs, as we create Tables. 

Create Trigger Trigger_Name

Begin Atomic

*actual sql stamens to be executed will come here.*

END;

Check here[creation](http://www.ibm.com/developerworks/data/library/techarticle/0308bhogal/0308bhogal.html) of Trigger with DB2 control center.

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2012%2F04%2F01%2Fdb2-triggers-part-2%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2026%2F02%2Fcropped-logo.png%3Ffit%3D96%252C96%26ssl%3D1&description=More%20on%20SQL%20Triggers%20in%20DB2%20Context)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/04/01/db2-triggers-part-2/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/04/01/db2-triggers-part-2/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/04/01/db2-triggers-part-2/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/04/01/db2-triggers-part-2/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20More%20on%20SQL%20Triggers%20in%20DB2%20Context&body=https%3A%2F%2Fsrinimf.com%2F2012%2F04%2F01%2Fdb2-triggers-part-2%2F&share=email)
-

### Like this:

Like Loading…
