MySQL Eliminar entradas conectadas desde la base de datos
DELETE t1,t2 FROM t1
INNER JOIN
t2 ON t2.ref = t1.id
WHERE
t1.id = 1;
Code language: SQL (Structured Query Language) (sql)
Ruben Spycher