View previous topic :: View next topic
|
Author |
Message |
vab987
New User
Joined: 01 Dec 2006 Posts: 29 Location: S.A
|
|
|
|
Hi all,
What is the default date of a Column in DB2 table . Is it 1900-01-01 ??
Thanks, |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Hi vab987,
What does "default date of a Column" mean? |
|
Back to top |
|
|
skkp2006
New User
Joined: 14 Jul 2006 Posts: 93 Location: Chennai,India
|
|
|
|
Default date is the one which we have to specify at the time of table definition.I think if we give the date field with default it will populate "01-01-0001" otherwise it will take the current date when we insert data into the table and no value is passed to the host variables.
But i have seen that normally the default value is moved to the host variable in the program rather than while creating the table.I am also looking forward for the reason for that :-(
Regards,
Syam |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
When you define a table-field which should contain a date you can specify a default.
ZZZ_ADTM DATE NOT NULL WITH DEFAULT '0001-01-01'
@skkp2006:
When you insert values into table-fields there is no automation. You have to provide the host-variable with a correct date-value for such fields. Otherwise you would get SQl-Error.
Regards, UmeySan |
|
Back to top |
|
|
vab987
New User
Joined: 01 Dec 2006 Posts: 29 Location: S.A
|
|
|
|
Thanks everyone . |
|
Back to top |
|
|
|