Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql - Cannot delete or update a parent row: a foreign key constraint fails

ALTER TABLE `advertisers`
  ADD CONSTRAINT `advertisers_ibfk_1` FOREIGN KEY (`advertiser_id`) 
      REFERENCES `jobs` (`advertiser_id`);
Source by sqlerrors.com #
 
PREVIOUS NEXT
Tagged: #mysql #Cannot #delete #update #parent #foreign #key #constraint #fails
ADD COMMENT
Topic
Name
3+9 =