MySQL 创建表时,设置时间字段自动插入当前时间
DROP TABLE IF EXISTS `CONTENT`; CREATE TABLE `CONTENT` ( `ID` char(20) NOT NULL, `CURRENT_TIME` timestamp not null default current_timestamp, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
时间: 2024-10-11 22:45:54
MySQL 创建表时,设置时间字段自动插入当前时间
DROP TABLE IF EXISTS `CONTENT`; CREATE TABLE `CONTENT` ( `ID` char(20) NOT NULL, `CURRENT_TIME` timestamp not null default current_timestamp, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;