You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@trafodion.apache.org by "Liu, Ming (Ming)" <mi...@esgyn.cn> on 2016/03/14 17:01:13 UTC
DDL column DEFAULT question
Hi, all,
I need to create a table in Trafodion with columns having DEFAULT, but I cannot make it work, any help will be very appreciated:
CREATE TABLE DBMARTA.ARPT_DIM_AUTORPT_PUB_MARK
(MARK_ID SMALLINT NOT NULL,
BEGIN_TIME DATE NOT NULL DEFAULT date'2008-01-01',
END_TIME DATE NOT NULL DEFAULT date'2018-01-01',
ACTIVE_FLAG SMALLINT,
MARK_NAME VARCHAR(20),
DESC_TXT VARCHAR(80),
primary key(MARK_ID, BEGIN_TIME, END_TIME)
);
*** ERROR[15001] A syntax error occurred at or before:
CREATE TABLE DBMARTA.ARPT_DIM_AUTORPT_PUB_MARK (MARK_ID SMALLINT NO
T NULL, BEGIN_TIME DATE NOT NULL DEFAULT date'2008-01-01', END
^ (134 characters from start of SQL statement)
*** ERROR[8822] The statement was not prepared.
It seems NOT NULL and DEFAULT are conflicting? Or my syntax has some other issue?
Thanks,
Ming