mysql sql add created updated timestamp to existing table

Solutions on MaxInterview for mysql sql add created updated timestamp to existing table by the best coders in the world

showing results for - "mysql sql add created updated timestamp to existing table"
Lotta
17 Nov 2016
1ALTER TABLE t1
2ADD COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
3ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;