"year" as a column name in a MySQL table

Can I name a column in a MySQL table year

? Any reason not for?

+2


a source to share


5 answers


You can name it year

, there is no reason not to because it is not a mysql / sql reserved keyword .



+3


a source


If you spell your IDs correctly , you can use almost any word you want:



SELECT * FROM `select` WHERE `select`.id > 100;

      

+4


a source


Check out the MySQL keyword list if you're ever curious.

+1


a source


It's not one of the reserved words , so it should be good.

0


a source


Please note that as of version 5.5 YEAR there is a reserved keyword.

I also think that in this case, statenjason will answer, "Check the MySQL keyword list if you're ever curious." must be correct.

0


a source







All Articles