Personal tools
You are here: Home DB2 DB2 UDB v9 Timestamp Auto Update on DB2 v9.5
Navigation
Log in


Forgot your password?
 
Document Actions

Timestamp Auto Update on DB2 v9.5

Now DB2 can automatically update the timestamp in a row whenever it is inserted or changed. You can enable this on timestamp columns when creating or altering tables as follows:

 

Choose one of these statements to enable timestamp auto update.

 

db2 "create table schemaName.tableName (cod int, update_ts timestamp not null \
generated always for each row on update as row change timestamp"

or

db2 "alter table schemaName.tableName add update_ts timestamp not null \
generated always for each row on update as row change timestamp"



Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls