PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.3Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5
TheYEAR type is a 1-byte type used to represent year values. It can be declared asYEAR with an implicit display width of 4 characters, or equivalently asYEAR(4) with an explicit display width.
The 2-digitYEAR(2) data type is deprecated and support for it is removed in MySQL 5.7.5. To convert 2-digitYEAR(2) columns to 4-digitYEAR columns, seeSection 11.2.5, “2-Digit YEAR(2) Limitations and Migrating to 4-Digit YEAR”.
MySQL displaysYEAR values inYYYY format, with a range of1901 to2155, and0000.
YEAR accepts input values in a variety of formats:
As 4-digit strings in the range
'1901'to'2155'.As 4-digit numbers in the range
1901to2155.As 1- or 2-digit strings in the range
'0'to'99'. MySQL converts values in the ranges'0'to'69'and'70'to'99'toYEARvalues in the ranges2000to2069and1970to1999.As 1- or 2-digit numbers in the range
0to99. MySQL converts values in the ranges1to69and70to99toYEARvalues in the ranges2001to2069and1970to1999.The result of inserting a numeric
0has a display value of0000and an internal value of0000. To insert zero and have it be interpreted as2000, specify it as a string'0'or'00'.As the result of functions that return a value that is acceptable in
YEARcontext, such asNOW().
If strict SQL mode is not enabled, MySQL converts invalidYEAR values to0000. In strict SQL mode, attempting to insert an invalidYEAR value produces an error.
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.3Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5