Check out example codes for "adding generated time in row mysql workbench". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE
 MODIFY dt_created datetime DEFAULT CURRENT_TIMESTAMP

ALTER TABLE
 MODIFY dt_modified datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

Learn ReactJs, React Native from akashmittal.com