I was wondering if date is actually a valid mysql column name?
According to the manual
MySQL permits some keywords to be used as unquoted identifiers because
many people previously used them. Examples are those in the following
list:
- ACTION
- BIT
- DATE
- ENUM
- NO
- TEXT
- TIME
- TIMESTAMP
So, from that I gather you are allowed to use date as a column name, but it doesn’t say that it is not recommended.
So, are there any implications to using date as a column name?
I was able to add a column named
dateto the database, no quotes required.So, yes, it’s possible.
But you don’t need to. Choose another column name, e.g.
"date_recorded". Not only is it better syntactically, but it’s more descriptive.