Apply OS: Windows, Mac, Linux

Apply Navicat Product: Navicat for MySQL, Navicat for MariaDB, Navicat Premium

Apply Navicat Version No.: All


In MySQL, it is not possible to set the default of a date field to today's date. Please refer to the except below:

With one exception, a DEFAULT value must be a constant; it cannot be a function or an expression. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE. The exception is that you can specify CURRENT_TIMESTAMP as the default for a TIMESTAMP column as of MySQL 4.1.2 or above.

For more details, please refer to: http://dev.mysql.com/doc/refman/5.1/en/create-table.html

Have more questions?
Submit Ticket