I have two tables 'test1' and 'test2' with the single column 'id'. 'test1' table contains the 5 rows with values like 1,2,3,4,5 and 'test2' table contains the 3 rows with values like 1,2,3 then if i want to get the just 4,5 from 'test1' I am using two below queries
select a.id
from test1 a,test2 b
where a.id=b.id(+) and b.id is null;
output:4,5
select a.id
from test1 a left outer join test2 b
on a.id=b.id
and b.id is null;
output:1,2,3,4,5
Both the queries are similar logically but these are giving different outputs...
Please explain me is there any difference....
Thanks in advance