Default VAlue for a Date Column

Database

Default VAlue for a Date Column

Hi all, the next sentence raises an error:

 

CREATE  TABLE "DWH"."EXAMPLE"  (

"Id" BIGINT NOT NULL,

"StartDate" DATE FORMAT 'DD-MM-YYYY',

"EndDate" DATE FORMAT 'DD-MM-YYYY' DEFAULT '31-12-9999',

PRIMARY KEY ("Id")

);

 

Failed [3630 : 22018] Default value incompatible with type of column ITEMGROUPASSIGNENDDATE. 

Any help? Thanks.

2 REPLIES
Enthusiast

Re: Default VAlue for a Date Column

The syntax defining the default date value is wrong, use the keyword DATE after DEFAULT keyword...

Following post will help you!

http://forums.teradata.com/forum/database/create-a-table-with-a-date-column-that-has-a-default

Re: Default VAlue for a Date Column

Thanks.