私の好みの構文は次のとおりです。
Delete deleteAlias
/* Select * */
from table1 deleteAlias
where exists ( select null from table1 innerTable1 INNER JOIN table2 ON table2.user = innerTable1.uid
INNER JOIN table3 ON table3.uid = table2.seminar WHERE table3.end_date < CURDATE())
AND deleteAlias.uid = innerTable1.uid
)
このアプローチの微妙な利点は、単純な「select *」を置き換えて、削除を実行する前に何が削除されるかを確認できることです。
/* Delete deleteAlias */
Select *
from table1 deleteAlias
where exists ( select null from table1 innerTable1 INNER JOIN table2 ON table2.user = innerTable1.uid
INNER JOIN table3 ON table3.uid = table2.seminar WHERE table3.end_date < CURDATE())
AND deleteAlias.uid = innerTable1.uid
)