Question: Add a foreign key to Pet referencing Owner. Also, add a check constraint ensuring PET _ AGE is greater than 0 . Select the correct

Add a foreign key to Pet referencing Owner. Also, add a check constraint ensuring PET_AGE is greater than 0. Select the correct SQL.
a. ALTER TABLE Pet
ADD FOREIGN KEY (OWNER_ID) REFERENCES Owner (OWNER_ID)
ADD CHECK (PET_AGE >0);
b. MODIFY TABLE Pet
ADD FOREIGN KEY (OWNER_ID) REFERENCES Owner (OWNER_ID)
ADD CHECK (PET_ID >0);
c. ALTER TABLE Pet
ADD FOREIGN KEY (OWNER_ID) ADD CHECK (PET_ID >0);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!