i have 2 tables:
- books b1
- price p1
i want to remove rows from both tables using the following query:
DELETE books FROM price p1 JOIN books b1
ON b1.BOOK_ID = p1.ID WHERE p1.ISBN IS NOT NULL AND p1.VALUTA = 'yen'
AND b1.YEAR BETWEEN 2011 AND 2014
but i get the error:
An unexpected token "price" was found following "books FROM" expected token may include "JOIN"
I think i am following the correct order.
DELETE (choose 1 of the 2 tables)
then FROM(the other table)
followed by JOIN(the first table again)
what am i doing wrong?