CREATE TABLE `good` (
`ids` int(11) NOT NULL auto_increment,
`times` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`times2` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`ids`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
INSERT INTO `good`
VALUES ( 1, '0', '0' ) 在windows下报错:#1292 - Incorrect datetime value: '0' for column 'times' at row 1
在不改变插入查询语句的前提下需要怎么配置mysql阿?
unix下的mysql版本是MySQL - 4.1.21-standard-log
windows下的是5.0.24a-community-nt
谢谢先了
`ids` int(11) NOT NULL auto_increment,
`times` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`times2` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`ids`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
INSERT INTO `good`
VALUES ( 1, '0', '0' ) 在windows下报错:#1292 - Incorrect datetime value: '0' for column 'times' at row 1
在不改变插入查询语句的前提下需要怎么配置mysql阿?
unix下的mysql版本是MySQL - 4.1.21-standard-log
windows下的是5.0.24a-community-nt
谢谢先了
VALUES ( 1,NULL,NULL)或者INSERT INTO `good`(ids)
VALUES ( 1)
VALUES ( 1, '0', '0' ) ;(1 row(s)affected)
(0 ms taken)
没有任何错误。