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()
I think it simple in mysql since mysql the inbuilt function called now() which gives current time(time of that insert).
So your query should look like similarly
CREATE TABLE defaultforTime( `creation_time` DATETIME DEFAULT CURRENT_TIMESTAMP, `modification_time` DATETIME default now() );
Thank you.