On Thu, Jan 09, 2003 at 10:48:18AM -0800, [EMAIL PROTECTED] wrote: > It seems odd to me that the data type "Year", should only allow the limited > range of 1901-2155. > i understand that this is so that it will store in 1 byte, but whats the > point? > i wanted to use a year field for historical data, such as the year famous > people were born, such > as abe lincoln - 1809, but surprise surprise 1809 is unacceptable. > > so i guess i dont see the point of the year datatype. > > i would be interented in any insight as to why the year type is like this.
Hello Sean, I don't speak for Monty here, but I would guess that you have hit the nail on the head. The years 1901-2155 are useful for a large segment of user data. Being able to store year information for account expiry dates, etc. in a single byte can be a considerable space savings when looking at a large database. This range of values could be represented by a TINYINT - however, this would require extra logic to conver the TINYINT to a year value. If you want to store years outside the range of YEAR, use the SMALLINT data type - it allows you to easily represent the years 32768 BC to 32767 AD. -- Zak Greant <[EMAIL PROTECTED]> | MySQL Advocate | http://zak.fooassociates.com MySQL Tip: Connect to a remote MySQL server using the mysql client % mysql --host=example.com --user=admin -p Public Service Announcement: Open Source Initiative (http://www.opensource.org) --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php