Categories
macos mysql windows-7

mysql year lower than 1900

i created a table “composers” VALUES (name VARCHAR(30), birth YEAR(4), death YEAR(4), city VARCHAR(30), country VARCHAR(30)). then i INSERT INTO composers VALUES (‘BACH Johann Sebastian’,1685,1750,’Eisenach’,’Germany’);. it returns 2 errors. the years are not between 1901 and 2155.

is there any way of changing this default so i can have an actual year for those columns? cant seem to find anything on the web.

i resorted to just use INTEGER(4) for those columns but would like to use YEAR(4) if it’s possible.