Bug #1696 Enable current_date as default for dates
Submitted: 29 Oct 2003 2:46 Modified: 23 Nov 2005 23:46
Reporter: Victor Toni Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[29 Oct 2003 2:46] Victor Toni
Description:
I would like this one to work:

ALTER TABLE `myTable`
	ALTER `myDate` SET DEFAULT current_date;

In general it would be usefull to be able to use not only constants as default values.

How to repeat:
ALTER TABLE `myTable`
	ALTER `myDate` SET DEFAULT current_date;
[23 Nov 2005 23:46] James Day
This was added for timestamps in MySQL 4.1. The description there says:

"Any of CURRENT_TIMESTAMP, CURRENT_TIMESTAMP(), or NOW() can be used in the DEFAULT and ON UPDATE clauses. They all have the same effect. "

More details at http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html