February 2018
Intermediate to advanced
510 pages
16h 10m
English
What is the preferred data type for storing manufacturing year? MySQL's answer to this is a YEAR data type. The YEAR data type requires 1 byte to store year information.
A YEAR column can be declared as:
manufacturing_year YEARormanufacturing_year YEAR(4)
One notable thing is that earlier MySQL versions supported the YEAR(2) type column declaration. The support for YEAR(2) has been discontinued from MySQL 8. It is possible that we might want to upgrade the older MySQL database to the MySQL 8 database. In a later section, we will explain the migration details from YEAR(2) to YEAR(4).
MySQL represents YEAR values in a YYYY format. The range of values is from 1901 to 2155 and 0000.
The following is the list of formats supported for ...
Read now
Unlock full access