Tag: MySQL错误1451

无法删除或更新父行:外键约束失败

在做: DELETE FROM `jobs` WHERE `job_id` =1 LIMIT 1 它错误: #1451 – Cannot delete or update a parent row: a foreign key constraint fails (paymesomething.advertisers, CONSTRAINT advertisers_ibfk_1 FOREIGN KEY (advertiser_id) REFERENCES jobs (advertiser_id)) 这是我的表格: CREATE TABLE IF NOT EXISTS `advertisers` ( `advertiser_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `password` char(32) NOT NULL, […]