MySQL Will you write the code in MySQL  Alter table employee so that column zipCode is a foreign key to table cityState, column zipCode Alter table customer so that column zipCode is a foreign key to table cityState, column zipCode zipCode is the foreign key. Cannot add or update a child row: a foreign key constraint fails (`dealership`.`#sql-163c_33`, CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`zipCode`) REFERENCES `citystate` (`zipCode`)) shows on my screen after I alter table employee.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter7: Database Administration
Section: Chapter Questions
Problem 7TD: Delete the index named ITEM_INDEX3.
icon
Related questions
Question

MySQL

Will you write the code in MySQL

 Alter table employee so that column zipCode is a foreign key to table cityState, column zipCode

Alter table customer so that column zipCode is a foreign key to table cityState, column zipCode

zipCode is the foreign key.

Cannot add or update a child row: a foreign key constraint fails (`dealership`.`#sql-163c_33`, CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`zipCode`) REFERENCES `citystate` (`zipCode`)) shows on my screen after I alter table employee.

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr