add created and updatedat fields in mysql

Solutions on MaxInterview for add created and updatedat fields in mysql by the best coders in the world

showing results for - "add created and updatedat fields in mysql"
Ronny
06 Feb 2017
1ALTER TABLE t1
2ADD COLUMN createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
3ADD COLUMN updatedAt DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
4