Connector/J follows the same rules that govern how values are inserted by a mysql client; see explanations in The YEAR Type for details.
Connector/J handles the retrieval of zero values from a YEAR column differently than a mysql client. Treatments of zero values depend on whether they are strings or numbers, and on the value of yearIsDateType:
If a string value of
'000'is entered into a YEAR column, when retrieved by Connector/J:
If a numeric value of
0000is entered into a YEAR column, when retrieved by Connector/J,