Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the tables have been created without foreign keys added, which of the following ALTER TABLE statements would create a foreign key on the category

Given the tables have been created without foreign keys added, which of the following ALTER TABLE statements would create a foreign key on the category_id in the product table to reference the category_id in the category table?
a.)
ALTER TABLE category
ADD CONSTRAINT fk_product
FOREIGN KEY (category_id)
REFERENCES product (category_id);
b.)
ALTER TABLE product
ADD CONSTRAINT fk_product
FOREIGN KEY (category_id)
REFERENCES category (category_id);
c.)
ALTER TABLE product
ADD CONSTRAINT
FOREIGN KEY (category_id)
REFERENCES category (category_id);
d.)
ALTER TABLE product
ADD CONSTRAINT fk_product
FOREIGN KEY category (category_id)
REFERENCES category_id;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

What will you do or say to Anthony about this issue?

Answered: 1 week ago