I have this query that performs left join
on tables and returns some rows.
Query with left join:
Select DISTINCT
e.id,e.name
from employee e
left join
job j on j.id = e.id
where e.id like 'D%'
Now, for the same query, I wanted to get the result without using left join
and I was able to produce this SQL query that gave me the same result as the above query.
Query without left join:
Select DISTINCT
e.id,e.name
from employee e, job j
where e.id like 'D%' AND (e.id=j.id OR e.id <> j.id)
Although the query returns the same result as above, my question is : Whether the second query makes sense and Whether it is equivalent to left join?