Possible Duplicate:
How do you set a default value for a MySQL Datetime column?
I have a table with column CreatedDate of data type datetime and i want to be able to set its default value to current DateTime how do i do it?
I tried Now() and CurrentTimestamp but no luck so far!!!
You can only set a static default in the table definition.
So unless you want to call
ALTER TABLEevery minute….Use a trigger:
See: http://dev.mysql.com/doc/refman/5.5/en/triggers.html