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
相关文章
相关标签/搜索