To automatically update your table / timestamp:
ALTER TABLE myTable CHANGE myTimestampColumn myTimestampColumn TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
To do this is not an automatic update:
ALTER TABLE myTable CHANGE myTimestampColumn myTimestampColumn TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
NOTE. The parameter "default current_timestamp" simply sets it to the current stamp by default, since the field is not-null. You can delete both non-zero and default if you want.
Olie Jul 29 '15 at 5:51 on 2015-07-29 05:51
source share