| View previous topic :: View next topic |
| Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Wed Nov 12, 2008 8:25 am Post subject: query in DB2 trigger |
|
|
Members,
I have table with columns:
| Code: |
EMPNO EMPNAME EMPAGE
|
I want to create a trigger in update mode that whenever the employee no is 111 , i want to update the EMPNO as 1 EMPNAME as X and EMPAGE as 10 and when EMPNO is not 111 i want to have EMPNO as 2 EMPNAME as Y and EMPAGE as 20 , please let me know how to do this and how do i execute my trigger.Thanks. |
|
| Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Nov 12, 2008 9:18 am Post subject: |
|
|
this is a link to a REDBOOK which discusses triggers:
though it is for db2 vsn9, the discussion is tailored for learning.
you can then go to the appropriate Appl Programers guide
for the version of db2 on your machine and determine what specfic
functions/syntax you need to follow:
http://www.redbooks.ibm.com/abstracts/sg246503.html?Open _________________ Dick Brenholtz
American living in Varel, Germany |
|
| Back to top |
|
 |
|
|
|