Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Database trigger
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== IBM DB2 LUW === IBM DB2 for distributed systems known as DB2 for LUW (LUW means '''L'''inux, '''U'''nix, '''W'''indows) supports three trigger types: Before trigger, After trigger and Instead of trigger. Both statement level and row level triggers are supported. If there are more triggers for same operation on table then firing order is determined by trigger creation data. Since version 9.7 IBM DB2 supports [[autonomous transactions]].<ref>{{Cite web|url=http://www.ibm.com/developerworks/data/library/techarticle/dm-0907autonomoustransactions/index.html|title=Autonomous transactions|date=July 30, 2009|website=www.ibm.com}}</ref> Before trigger is for checking data and deciding if operation should be permitted. If exception is thrown from before trigger then operation is aborted and no data are changed. In DB2 before triggers are read only β you can't modify data in before triggers. After triggers are designed for post processing after requested change was performed. After triggers can write data into tables and unlike some{{Which|date=June 2012}} other databases you can write into any table including table on which trigger operates. Instead of triggers are for making views writeable. Triggers are usually programmed in [[SQL PL]] language.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)