List:General Discussion« Previous MessageNext Message »
From:william drescher Date:January 27 2012 10:24pm
Subject:Re: setting the default of a date field
View as plain text  
On 1/27/2012 3:21 PM, Peter Brawley wrote:
> On 1/27/2012 11:18 AM, william drescher wrote:
>> Is there a way to set the default of a date field to the date
>> the record is generated ?
>>
>> bill
>>
>
> Use a TIMESTAMP. Default DATE(TIME) columns with Triggers.
>
> PB
>
When I try
ALTER TABLE `ptInfo` CHANGE `lastQuarterlyReview` 
`lastQuarterlyReview` DATE NOT NULL DEFAULT CURRENT_TIMESTAMP
I get:
#1067 - Invalid default value for 'lastQuarterlyReview'

bill

Thread
setting the default of a date fieldwilliam drescher27 Jan
  • Re: setting the default of a date fieldPeter Brawley27 Jan
    • Re: setting the default of a date fieldwilliam drescher27 Jan
      • Re: setting the default of a date fieldPeter Brawley27 Jan
        • Re: setting the default of a date fieldwilliam drescher28 Jan