Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Similar quires produce different output !! why ?

$
0
0
[code="sql"]create table #t1 (id int)create table #t2 (id int)insert into #t1 values (1)insert into #t1 values (2)insert into #t1 values (3)insert into #t2 values (1)insert into #t2 values (2) [/code]Run the below quires, you will get 2 different outputs.Second is the desired output. I cant find reason for query1[code="sql"]-- Query1select * from #t1 a left join #t2 b on a.id = b.id and b.id is null-- Query1select * from #t1 a left join #t2 b on a.id = b.id where b.id is null[/code]

Viewing all articles
Browse latest Browse all 3145

Trending Articles