Alex Rivera | Logout

What are implications to using "date" as a MySQL column name?

Asked 2012-10-08T05:14:37.983
22

According to the manual (http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html#table-reserved-words-new-5.5):

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 you are allowed to use date as a column name, but it doesn't say that it is not recommended.

What are implications to using date as a column name?

Edit
Report

1 Answer

19

I was able to add a column named date to 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.

answered 2012-10-08T15:51:52.860

Your Answer