At 13:10 -0400 5/9/02, Joachim Schmidt wrote:
>Hi, I am trying to create a table with one column having by default the
>actual hour of the day.
>the code looks like
>create table test (clock TIME, DEFAULT HOUR(NOW()));
>I get an SQL error. Is there a way to define a default like that in mysql?
>I would be grateful if some one can give me a suggestions in this regard
According to the MySQL manual, default values must be constants.
Set the column to the current hour at the time you create the record.