袁来如此的工作笔记
袁来如此的工作笔记
竹杖芒鞋轻胜马,谁怕? 一蓑烟雨任平生。

MySQL使用timestamp时间自动更新问题解决

浏览量:188

create table if not exists account(
            id int(12) NOT NULL PRIMARY KEY AUTO_INCREMENT,
            accountIp varchar(50) not null,
            accountNum int(12) not null ,
            accountDateFirst timestamp not null DEFAULT CURRENT_TIMESTAMP,
            accountDate timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
        )  ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
打赏