I'm trying to delete 1 record based on primary key from (3) tables.
Here is the statement that I'm using
DELETE FROM CUSTOMER
WHERE EXISTS
( SELECT MERCHANTNAME
FROM CREDITCARD
WHERE MERCHANTNAME = 'VISA');
Deleting record of a customer with a VISA from customer table.
Here is the error that I'm getting
ORA-02292: integrity constraint (PLATINUMAUTOGROUP.CDRIVERLICENSENUM_FK) violated - child record found
I'm guessing CDRIVERLICENSENUM is the foreign key in the 3rd table that I have. How do I go about this? Is it possible to delete 1 record from 3 tables in 1 statement?
the three tables are
customer / customer_creditcard / creditcard