[NTLUG:Discuss] OT: MySQL date field defalt

Steve Southwell ses at sagepost.com
Sun Apr 18 21:46:03 CDT 2004


That's what I was afraid of...  Thanks for the confirmation.
-Steve

Jack Snodgrass wrote:

>With mysql, defaults have to be static values... 
>not functions like now() or curent_date(). 
>
>jack 
>
>
>On Sun, 2004-04-18 at 18:19, Steve Southwell wrote:
>  
>
>>I'm sort of a newbie at using MySQL, and I'm converting an app from 
>>Progress DB to MySQL.
>>
>>I've got almost everything in the schema to translate properly, but the 
>>one thing I've found that doesn't seem to have a counterpart in MySQL is 
>>the ability for a field with Type = "Date" to default to the current 
>>date upon record creation.
>>
>>I'm aware that the timestamp type will always be the current date on 
>>INSERTs and UPDATEs unless explicitly set, but that's not what I want - 
>>I'd like to have the field only default to the current date on the 
>>initial INSERT of the record.
>>
>>Anyone know how to do this, or is it just impossible with MySQL, and 
>>I'll have to start requiring the application to set the default date?
>>
>>Much thanks,
>>    
>>
>
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss
>  
>

-- 
Steve Southwell                     214-488-2239 (Voice)
President / CEO                     214-280-6439 (Mobile)
SagePost, Inc.                   http://www.sagepost.com
Internet Data Services Provider






More information about the Discuss mailing list