Check out example codes for "mysql on update current_timestamp". It will help you in understanding the concepts better.

Code Example 1

Press CTRL+C to copy CREATE TABLE t1 (
  ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  dt DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

Learn ReactJs, React Native from akashmittal.com