View previous topic :: View next topic
|
Author |
Message |
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Hi
How to force the create/update timestamp to current timestamp during insert/update from one table to another? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
UPDATED_TIMESTAMP = current timestamp |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi HameedAli,
That column should be created as ROW CHANGE TIMESTAMP, it should take care of the things.
For more information please look into DB2 V9 SQL Reference ( Chapter 5 --> Create Table --> Example 9)
Thanks,
sushanth |
|
Back to top |
|
|
HameedAli
Active User
Joined: 16 Apr 2009 Posts: 151 Location: India
|
|
|
|
Thanks sushanth, this is what I was looking for.
Thanks for your time Craq, I was looking for something like row change timestamp.
Is there any other possible ways to update the timestamp other than these 3 ways?
1) Create TIMESTMAP column as row change timestamp
2) Create a trigger to update timestamp
3) Update timestamp manually. |
|
Back to top |
|
|
|