Question : mysql sql add created updated timestamp to existing table
Answered by : mushy-meerkat-uxxn9b8muahb
ALTER TABLE t1
ADD COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
Source : https://stackoverflow.com/questions/50603953/how-to-add-created-at-and-updated-at-columns/50604109 | Last Update : Sat, 26 Sep 20