CREATE TABLE `placements` (
......
......,
PRIMARY KEY (`pl_id`),
KEY `cur3` (`currency`),
KEY `pl2` (`date_arranged`),
KEY `pl3` (`start_date`,`end_date`),
KEY `pla_peo_id` (`peo_id`),
KEY `pla_placed_with` (`placed_with`),
KEY `pla_reh2` (`remind_agent`,`status`,`end_date`),
KEY `reh_temp2` (`parent_id`),
KEY `pl_id` (`pl_id`),
CONSTRAINT `pla_comp_fk1` FOREIGN KEY (`placed_with`) REFERENCES `companies` (`pid`),
CONSTRAINT `pla_con_fk1` FOREIGN KEY (`peo_id`) REFERENCES `contractors` (`pid`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8
我有上面的表结构。我想更新pl_id = 320636的表格,并将end_date设置为新值。
update placements set end_date = '2016-03-09 00:00:00' where pl_id = '320636'
给予重复条目' 320636-2016-02-15 00:00:00'关键' PRIMARY'错误。
我试图删除主键但没有运气。请帮帮我吗?