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 department
Given the tables have been created without foreign keys added, which of the following ALTER TABLE statements would create a foreign key on the departmentid in the employee table to reference the departmentid in the department table?
a
ALTER TABLE employee
ADD CONSTRAINT fkemployee
FOREIGN KEY departmentid
REFERENCES department departmentid;
b
ALTER TABLE employee
ADD CONSTRAINT
FOREIGN KEY departmentid
REFERENCES department departmentid;
c
ALTER TABLE department
ADD CONSTRAINT fkemployee
FOREIGN KEY departmentid
REFERENCES employee departmentid;
d
ALTER TABLE employee
ADD CONSTRAINT fkemployee
FOREIGN KEY department departmentid
REFERENCES departmentid;
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
