1
votes

I create a table with Liqibase on our test Databse we have no Problem to create following table:

CREATE TABLE ICEM_DEP.T_APP_UNIT_ENV_INST_OBJ (
  ENVIRONMENT_ID INTEGER NOT NULL, 
  INSTANCE_ID INTEGER NOT NULL, 
  OBJECT_NAME VARCHAR(4000) NOT NULL, 
  APP_UNIT_ID INTEGER NOT NULL, 
  CREATION_DATE TIMESTAMP DEFAULT current timestamp(0), 
  LAST_CHANGE_DATE TIMESTAMP DEFAULT current timestamp(0), 
  CREATION_USER INTEGER NOT NULL,
  LAST_CHANGE_USER INTEGER NOT NULL, 
  ACTION_FLAG VARCHAR(1)
)

If I run this statement on the costumer database the is following Error:

DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=(;LT current timestamp;DEFAULT, DRIVER=4.13.127

Any Suggestion?

2
DB2 for what? LUW, System z, i5/OS?paxdiablo

2 Answers

1
votes

did you try with

CREATION_DATE TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP,
LAST_CHANGE_DATE TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP,
0
votes

The format for passing the lowest possible value to the Timestamp Function is

Either

TIMESTAMP('0001-01-01',0)

or

TIMESTAMP('0001-01-01-00.00.00.00000')