Various Mysql time functions mysql time functions are rich 1. SQL code SECOND (t. file_time) 2. current Time SQL code now () 3. select DATE_SUB (curdate (), INTERVAL 1 DAY) 4. timestamp default mysql timestamp Field weird problem create table statement: SQL code CREATE TABLE 'testtimestamp' ('id' INT NOT NULL AUTO_INCREMENT, 'file _ time' TIMESTAMP NOT NULL, 'Scan _ time' timestamp null, 'created 'timestamp not null, 'modified' timestamp not null, primary key ('Id ') ENGINE = InnoDB AUTO_INCREMENT = 1 default charset = utf8; after execution, the default value of file_time is CURRENT_TIMESTAMP on update CURRENT_TIMESTAMPscan_time. The default value is NULLcreated and the default value of modified is '2017-00-00 00:00:00, the first timestamp Field of the create statement is CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, and the default value is now ()!!!??? This will lead to a default value. If this field is not found in the update statement, the current time will be filled by default. Modify type: SQL code ALTER TABLE 'database'. 'tablename' CHANGE COLUMN 'columname' TIMESTAMP NOT NULL DEFAULT '2017-00-00 00:00:00 ';