Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DEFAULT ON UPDATE

3784350Sep 14 2018 — edited Sep 17 2018

Hi All

I want to add a column to a table which will default to the current date and time on insert AND update. I found code that is supposed to work on Oralce 12c, but I get the error "missing right parenthesis":

     alter table schemaname.tablename add (UPDATE_DT DATE DEFAULT SYSDATE ON UPDATE SYSDATE)

Is my information incorrect - is this actually not valid for Oracle 12c?

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2018
Added on Sep 14 2018
6 comments
2,632 views