MySQL CURRENT_TIMESTAMP on create and on update MySQL CURRENT_TIMESTAMP on create and on update mysql mysql

MySQL CURRENT_TIMESTAMP on create and on update


Guess this is a old post but actually i guess mysql supports 2 TIMESTAMP in its recent editions mysql 5.6.25 thats what im using as of now.


i think it is possible by using below technique

`ts_create` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',`ts_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP


You are using older MySql version. Update your myqsl to 5.6.5+ it will work.