I have a table which has both ChildID and ParentID. Due to the way the data was compiled, in some cases those values are reversed. So I wrote what I thought was a simple Inner Join where both values are reversed and tried to delete the first tables value. I seem to remember this working fine before except now this del
<code>Delete S1 from TableA S1
Inner Join TableA S2
On S1.ChildID=S2.ParentID
and S1.ParentID=S2.ChildID
</code>
<code>Delete S1 from TableA S1
Inner Join TableA S2
On S1.ChildID=S2.ParentID
and S1.ParentID=S2.ChildID
</code>
Delete S1 from TableA S1
Inner Join TableA S2
On S1.ChildID=S2.ParentID
and S1.ParentID=S2.ChildID
https://sqlfiddle.com/mysql/online-compiler?id=bc5a98e7-efd9-443c-87d9-3eba3304da82