Question: You are working with the tables as shown in this diagram. You need to make sure that any record added to the purchases table consists of a customerID, which already exists in the customers table, and a carID, which already exists in the cars table. You decide to use a trigger to do the validation. Which one do you use?
- `AFTER INSERT`
- `BEFORE INSERT`
- `CROSS JOIN`
- `IF EXISTS`
Answer: The correct answer of the above question is Option B:`BEFORE INSERT`