SQL - Table Constraints
A parent table has a foreign key referenced by a child table with
ON DELETE CASCADE. You want to prevent deletion of a parent row if any child rows exist, but keep the cascade for some cases. How can you achieve this?