the following is the code snippet:
CREATE TABLE `test` ( `t1` TIMESTAMP NOT NULL , `ww` VARCHAR( 5 ) NOT NULL ) ENGINE = MYISAM CREATE TABLE `test` ( `t1` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `ww` varchar(5) NOT NULL ) ENGINE=MyISAM ;
Here is the code snippet:
Automatic initialization and update:
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
only automatic initialization:
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
only automatic update
ts TIMESTAMP DEFAULT 0 ON UPDATE CURRENT_TIMESTAMP
just give a constant (note: 0000-00-00 00:00 :00)
ts TIMESTAMP DEFAULT 0