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.
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.
Chapter7: Database Administration
Section: Chapter Questions
Problem 7TD: Delete the index named ITEM_INDEX3.
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
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.Recommended textbooks for you
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr