mysql更新記錄時設置自動更新時間戳

爲什麼80%的碼農都做不了架構師?>>>    假設表有3個字段:id、name、update_time,希望在新增記錄時能自動設置update_time字段爲當前時間 設置DEFAULT CURRENT_TIMESTAMP即可 CREATE TABLE `test` ( `id` int NOT NULL, `name` varchar(255), `update_time` timestamp
相關文章
相關標籤/搜索