i have 3 tables and i dont want define any foreign key in my tables. my tables structure are like below: tables diagram
i have written this query :
delete relativedata, crawls, stored
from relativedata inner join
crawls
on relativedata.crawl_id = crawls.id and
relativedata.id = ? inner join
stored
on stored.crawl_id = crawls.id
this query works for me unless one of tables has no records. now how can i do this delete in 3 tables in 1 query?