Problem:
You can't use DB2 table wizard to set a default value as shown below because the wizard surrounds the CURRENT TIMESTAMP with a single quote, thus the table create statement fails.
Resolution:
- First create the table and manually without a default value
- Then alter the table as shown in this example:
ALTER TABLE SERVICES.BRAND ALTER COLUMN LAST_UPDATE_TIMESTAMP SET WITH DEFAULT CURRENT TIMESTAMP ;
Wow. Thank you. I was banging my head against the wall trying to figure out why this wasn't working when the manual was saying that it would. I'll have to report that bug to the Control Center people.
ReplyDelete