List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:January 29 2010 9:09pm
Subject:Re: Difference between MYSQL_TYPE_DATE & MYSQL_TYPE_NEWDATE ?
View as plain text  
Hi!

>>>>> "Oystein" == Oystein Grovlen <ystein> writes:

Oystein> Prafulla wrote:
>> Hi,
>> I found these two different field types for
>> date.  Can someone tell me the difference between these two ?
>> MYSQL_TYPE_NEWDATE
>> MYSQL_TYPE_DATE
>> 

Oystein> MYSQL_TYPE_DATE is obsolete, it represented the DATE type used before 
Oystein> MySQL 5.0.

MySQL can handle both date types.  For any new table, or if you do
ALTER TABLE, MYSQL_TYPE_NEWDATE is used.

The only difference is that MYSQL_TYPE_DATE takes 4 bytes while
MYSQL_TYPE_NEWDATE takes 3 bytes to store.

Regards,
Monty

Thread
Difference between MYSQL_TYPE_DATE & MYSQL_TYPE_NEWDATE ?Prafulla28 Jan
  • Re: Difference between MYSQL_TYPE_DATE & MYSQL_TYPE_NEWDATE ?Øystein Grøvlen28 Jan
    • Re: Difference between MYSQL_TYPE_DATE & MYSQL_TYPE_NEWDATE ?Michael Widenius29 Jan