How do you set a default value for a MySQL Datetime column?
In SQL Server it\'s getdate(). What is the equivalant for MySQL? I\'m using MySQL 5.x if tha
getdate()
If you set ON UPDATE CURRENT_TIMESTAMP it will take current time when row data update in table.
ON UPDATE CURRENT_TIMESTAMP
CREATE TABLE bar( `create_time` TIMESTAMP CURRENT_TIMESTAMP, `update_time` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )