I am trying to set a datatype for a column on a new table in MySQL 5.1 to YEAR with a default value of 2009 but it will not allow this. Should I use another integer datatype instead and/or how do I use the YEAR datatype correctly?
A:
It is working for me now. I believe there was an issue when altering an existing table to change the column datatype from VARCHAR to YEAR after the table was created. I was messing around and changed the datatype from VARCHAR to INTEGER and then to YEAR and there were no errors at that point.
Jason Rikard
2009-07-05 14:19:29