Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

not exits vs. lelf join

$
0
0

Hi,

I think not exits same as left join, but why the results are different? -thanks

Query1- 1 record returned 

select*
    frommyorders a
    whereNOT EXISTS 
                (select *
                from mysal b
                where a.ordercd b.ordercd
                )
    and a.company =456

query 2: 500 records returned
select*
frommyorders a
 left join mysal b
 on a.ordercd b.ordercd
 and a.company =456


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>