Hi guys,What is the difference btw these 3 commands ? Run the 3 of them to check but they are returning different results..select a.CompanyIDFROM t1 a where NOT EXISTS (Select b.CompanyID FROM t2 b) - 0 rowsselect a.CompanyIDFROM t1 a, t2 b where a.CompanyID<>b.CompanyID - 218 rowsselect distinct (a.CompanyID) FROM t2 a where a.CompanyID NOT IN (Select b.CompanyID FROM t1 b) - 4 rows
Will left join be able to work correctly if i use it in Delete like this:delete a from t1 a left join tbDemurrage d on d.CompanyID=a.CompanyID left join t2 e on e.CompanyID=a.CompanyID where d.CompanyID is null and e.CompanyID is null