Question: 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 categoryid in the product table to reference the categoryid in the category table?
a
ALTER TABLE category
ADD CONSTRAINT fkproduct
FOREIGN KEY categoryid
REFERENCES product categoryid;
b
ALTER TABLE product
ADD CONSTRAINT fkproduct
FOREIGN KEY categoryid
REFERENCES category categoryid;
c
ALTER TABLE product
ADD CONSTRAINT
FOREIGN KEY categoryid
REFERENCES category categoryid;
d
ALTER TABLE product
ADD CONSTRAINT fkproduct
FOREIGN KEY category categoryid
REFERENCES categoryid;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
