[Solved] Alter Table T1 Alter Column "Date" set default
Posted: Fri May 10, 2013 7:43 pm
Hello,
i wonder, if there is a possibility for setting another timestamp by default then?
e.g.
I know, this does not work.
I'm using a splitted or a server Version of HSQL 2.2.8, so also Triggers are possible, but i don't know if neccessary and when, how to do it.
Can anybody help me?
And a further question is, if it would be possible to decide between different default values e.g. on the current time.
If it's before 12:00 AM then CURRENT_TIMESTAMP - 1 DAY
If it's after 12:00 AM then CURRENT_TIMESTAMP + 1 DAY
Rik
i wonder, if there is a possibility for setting another timestamp by default then
Code: Select all
CURRENT_TIMESTAMP
e.g.
Code: Select all
Alter Table T1 Alter Column "Date" set default CURRENT_TIMESTAMP - 1 DAY
I'm using a splitted or a server Version of HSQL 2.2.8, so also Triggers are possible, but i don't know if neccessary and when, how to do it.
Can anybody help me?
And a further question is, if it would be possible to decide between different default values e.g. on the current time.
If it's before 12:00 AM then CURRENT_TIMESTAMP - 1 DAY
If it's after 12:00 AM then CURRENT_TIMESTAMP + 1 DAY
Rik