How to add column 'name' to the film_category table and have it reference category.name in PostgreSQL? This
Fantastic news! We've Found the answer you've been seeking!
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
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"
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date: