oracle - Comparing two SQL Queries, will these return the same result? -
i have following query:
select * customership left outer join (select distinct b.shipseq shipseq orders a, customership b a.orderid in (select orderid orders customerid = @customerid , ordertype <> 'a') , b.customerid = @customerid , b.shipseq = a.custship , orderstatus <> 'c' group b.shipseq) customerid = @customerid , (address not '%retail%store%') , shipseq = i.shipseq(+) order shipto desc, orderdate desc;
i'm confused why there left outer join
? wouldn't query return same results?
select * customership customerid = @customerid , (address not '%retail%store%') order shipto desc, orderdate desc;
i'm relatively new sql, in case first query return additional records second query not?
both queries return same set of records customership table not return same information.
the first query return columns both customership + shipseq column "i" query. second query return customership columns.
Comments
Post a Comment