MySQL auto-store datetime for each row

后端 未结 7 467
醉话见心
醉话见心 2020-12-04 11:33

In MySQL, I\'m sick of adding the columns dt_created and dt_modified (which are date time stamps for creation and last modified respectively) to al

7条回答
  •  离开以前
    2020-12-04 11:59

    In phpmyadmin you can set enter image description here

    OR use this query

    ALTER TABLE  `tablename`
        CHANGE  `dt_created`  `dt_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
    

提交回复
热议问题