Check out example codes for "ADD COLOUNS CREATED AND UPDATED AT IN MYSQL". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE t1
ADD COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

Learn ReactJs, React Native from akashmittal.com