0

I have questions regarding a field that I'm creating in my table. I want to set its value to DEFAULT CURRENT_TIMESTAMP, but my question is this, to set this DEFAULT value, I need to create this field of type TIMESTAMP or DEFAULT can use this value in the DATETIME type?

  • In more recent versions of MySQL, you can default a `datetime` column. – Gordon Linoff Jul 02 '15 at 11:56
  • Can you tell me from what version I can use DATETIME field to CURRENT_TIMESTAMP value to DEFAULT? – Silvandro Oliveira Jul 02 '15 at 11:57
  • possible duplicate of [How do you set a default value for a MySQL Datetime column?](http://stackoverflow.com/questions/168736/how-do-you-set-a-default-value-for-a-mysql-datetime-column) – Kalle Jul 02 '15 at 12:12
  • @SilvandroOliveira . . . It appears in the 5.6 documentation (http://dev.mysql.com/doc/refman/5.6/en/data-type-defaults.html), but not in the 5.5 documentation (http://dev.mysql.com/doc/refman/5.5/en/data-type-defaults.html). – Gordon Linoff Jul 02 '15 at 23:47

0 Answers0