List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 7 2000 7:51pm
Subject:Re: Default Datetime
View as plain text  
>I have a simple MySQL database with a table that has a datetime 
>field. How do I set it so the default is Date() so when I enter a 
>record, using ASP, that it automatically puts the Date() into the 
>field?

If you're asking how can you automatically initialize the column to
today's date, you can't.  You have to do it yourself.  Default values
can only be constants.

See the discussion of default values at:
http://www.mysql.com/documentation/mysql/commented/?section=CREATE_TABLE

-- 
Paul DuBois, paul@stripped
Thread
Default DatetimeGreg7 Nov
  • Re: Default DatetimePaul DuBois7 Nov
  • Re: Default DatetimeNeil Davis7 Nov
Re: Default DatetimeNeil Davis7 Nov