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.
Chapter4: Constraints
Section: Chapter Questions
Problem 3MC: Which of the following SQL statements is invalid and returns an error message?
ALTER TABLE books ADD...
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