When I was trying to change my table from table viewer in heidi it wouldn't allow CURRENT_TIMESTAMP on DATETIME
https://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html
create table t1 (
`dateIn` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`dateOut` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`dateOfChange` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CURRENT_TIMESTAMP is valid on DATETIME now
Code modification/commit
from ansgar.becker,
9 years ago,
revision 4856
Allow applying CURRENT_TIMESTAMP to DATETIME columns. See http://www.heidisql.com/forum.php?t=16715
Please login to leave a reply, or register at first.