一、可以建表
drop table if exists t_test;
CREATE TABLE t_test(
Id int(20) NOT NULL AUTO_INCREMENT comment '自增长id',
student_no varchar(32) NOT NULL comment '学生编号',
sys_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
PRIMARY KEY (id,FStationNo)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment '测试的表';
二、插入数据、修改数据
insert into t_test(id,student_no,sys_time) values(id,"001",null);
insert into t_test(id,student_no,sys_time) values(id,"002",null);
update t_test set student_no="002" where student_no="001";
三、查看
发现时间是随着修改而改变的!!