There are a couple of problems with your delete statements:

1) You can only delete from one table with a single delete statement

2) The keyword FROM was missing - eg.

delete from test12 where ...

If you need to delete from both tables, then is it possible to use a foreign key constraint with on delete cascade?

Failing that, I guess you are going to have to write a PL/SQL function to do the job.

HTH

David.