List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 11 2002 10:48pm
Subject:Re: basic question
View as plain text  
At 11:50 -0400 10/11/02, Edward Peloke wrote:
>sql query
>
>when I am defining a table, how do I set the default of a datetime column to
>the current time?  I tried setting the default to now()  but it just fills
>the column with 00:00 etc..

You don't.  Default values must be constants.

The TIMESTAMP column type might be useful to you for this purpose.
But read about it in the manual to be sure you're aware of all its
properties.

>
>Thanks,
>Eddie

Thread
basic question(Edward Peloke)11 Oct
  • Re: basic questionPaul DuBois12 Oct
  • Re: basic questionNZEYIMANA Emery Fabrice14 Oct