hopefully you can get what I want to do from the mysql query below.
delete d1 from D as d1, D as d2 left join C rel1 on rel1.tld_tod_id=d1.did left join C rel2 on rel2.tld_tod_id=d2.did where d1.did!=d2.did and d1.name=d2.name and rel1.cid is null and rel2.cid is not null ;
I got unknown column d1.did in on clause,
how do I get it right?
Using
asis for column aliases. For table aliases just put the alias behind the tableIf I understand it right this will delete rows in the table
Dwith a duplicate name if it has no relation with tableC. However if that’s the case shouldn’t the joins have to be OUTER?