List:General Discussion« Previous MessageNext Message »
From:KKoTY Date:February 5 2004 12:09pm
Subject:Re: [Q] setting DATE field with default NOW value?
View as plain text  
you can use TIMESTAMP data type, which have default NOW()

----- Original Message ----- 
From: "Riaan Oberholzer" <riaanoberholzer@stripped>
To: <mysql@stripped>
Sent: Thursday, February 05, 2004 12:38 PM
Subject: [Q] setting DATE field with default NOW value?


> In a table definition, how do I get a date field to be
> assigned as DEFAULT the current date?
> 
> I tried:
> 
> dateField DATE DEFAULT CURDATE()
> 
> but that gives me syntax errors....
> 
> Help?
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 
> 
Thread
[Q] setting DATE field with default NOW value?Riaan Oberholzer5 Feb
  • Re: [Q] setting DATE field with default NOW value?Martijn Tonies5 Feb
  • Re: [Q] setting DATE field with default NOW value?KKoTY5 Feb
  • Re: [Q] setting DATE field with default NOW value?Martijn Tonies5 Feb
    • Re: [Q] setting DATE field with default NOW value?Brent Baisley5 Feb