5 messages in com.mysql.lists.mysqlRe: [Q] setting DATE field with defau...
FromSent OnAttachments
Riaan Oberholzer05 Feb 2004 03:38 
Martijn Tonies05 Feb 2004 03:45 
KKoTY05 Feb 2004 04:09 
Martijn Tonies05 Feb 2004 04:18 
Brent Baisley05 Feb 2004 07:32 
Subject:Re: [Q] setting DATE field with default NOW value?
From:Martijn Tonies (m.to@upscene.com)
Date:02/05/2004 03:45:45 AM
List:com.mysql.lists.mysql

Hi,

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?

According to the documentation for the DEFAULT <value> clause, <value> can only be a real value. Not a function.

So basically, you're out of luck.

With regards,