Question
How to add column 'name' to the film_category table and have it reference category.name in PostgreSQL? This is using the PostgreSQL dvdrental database Attempt 1
How to add column 'name' to the film_category table and have it reference category.name in PostgreSQL?
This is using the PostgreSQL dvdrental database
Attempt 1
INSERT INTO film_category(name)
SELECT category.name
FROM category
INNER JOIN film_category
ON category.category_id = film_category.category_id;
ERROR: there is no unique constraint matching given keys for referenced table "category"
4 INSERT INTO film_category (genre) 5 SELECT category.genre FROM category 7 INNER JOIN film_category 8 ON category.category_id = film_category.category_id; 16 Data Output Explain Messages Notifications ERROR: there is no unique constraint matching given keys for referenced table "category" SQL state: 42830
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Concepts of Database Management
Authors: Philip J. Pratt, Mary Z. Last
8th edition
1285427106, 978-1285427102
Students also viewed these Databases questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App