日期时间值不正确:第 1 行 'created_date' 列的“2018-03-00”
Incorrect datetime value: '2018-03-00' for column 'created_date' at row 1
大家好我是运行这个查询
DELETE FROM us_current WHERE created_date > '2018-03-00';
它向我显示以下错误并停止执行
我的table结构如下:
CREATE TABLE `us_current` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created_date` datetime DEFAULT NULL,
`status` tinyint(2) DEFAULT '1' COMMENT '1 - active, 0 - inactive',
PRIMARY KEY (`id`),
) ENGINE=InnoDB AUTO_INCREMENT=113933 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
试试这个:
DELETE FROM us_current WHERE created_date >= '2018-03-01';
大家好我是运行这个查询
DELETE FROM us_current WHERE created_date > '2018-03-00';
它向我显示以下错误并停止执行
我的table结构如下:
CREATE TABLE `us_current` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created_date` datetime DEFAULT NULL,
`status` tinyint(2) DEFAULT '1' COMMENT '1 - active, 0 - inactive',
PRIMARY KEY (`id`),
) ENGINE=InnoDB AUTO_INCREMENT=113933 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
试试这个:
DELETE FROM us_current WHERE created_date >= '2018-03-01';