Direction: Choose the correct option
Q1.
What is the purpose of a foreign key?
Direction: Choose the correct option
Q2.
CREATE TABLE orders (
order_id INT PRIMARY KEY,
customer_id INT,
FOREIGN KEY (customer_id) REFERENCES customers(id)
);What does customer_id reference?Direction: Choose the correct option
Q3.
What happens if you try to insert a foreign key value that doesn't exist in parent table?
Direction: Choose the correct option
Q4.
What does ON DELETE CASCADE do?
Direction: Choose the correct option
Q5.
What does ON DELETE SET NULL do?
