Equivalent of generated always from DB2 UDB in Oracle 12.x
We're migrating several databases from DB2 UDB 9.7 to Oracle 12.1 or 12.2
In DB2 , a lot of columns have this syntax:
TMS_MAJ | TIMESTAMP | NOT NULL | GENERATED BY DEFAULT FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP |
That means that column tms_maj will be updated at insert time and on each update of any columns from that row
The only way to do this in Oracle would be to use the default sysdate in the column definition and using an after-update trigger on the row,
I did not find a way to avoid the trigger , any other ideas ?
Thanks,