Skip to Main Content
IBM Db2 11.1 Certification Guide
book

IBM Db2 11.1 Certification Guide

by Robert (Kent) Collins, Mohankumar Saraswatipura
June 2018
Intermediate to advanced content levelIntermediate to advanced
478 pages
10h 52m
English
Packt Publishing
Content preview from IBM Db2 11.1 Certification Guide

Creating and using triggers

A trigger is a database object that can perform a set of actions in response to events such as an INSERT, UPDATE, or DELETE operation on a specified table or view. You can use triggers, along with referential constraints and CHECK constraints, to enforce data integrity rules.

Five major components are associated with any trigger:

  • The subject on which the trigger is defined–tables or views
  • The event which initiates the trigger–an INSERT, UPDATE, or DELETE operation
  • The activation time of the trigger–a BEFORE or AFTER the event
  • The granularity which specifies whether the trigger's actions are performed once for the statement or once for each of the affected rows–a FOR EACH STATEMENT or FOR EACH ROW action
  • The action, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Red Hat RHCSA 8 Cert Guide: EX200, 2nd Edition

Red Hat RHCSA 8 Cert Guide: EX200, 2nd Edition

Sander van Vugt

Publisher Resources

ISBN: 9781788626910Other