Привет всем.
Может кто знает, почему результаты выборок - разные?
Может кто знает, почему результаты выборок - разные?
declare @R table (x int) declare @R2 table (x int) insert into @R(x) Values (0),(1),(2),(3); insert into @R2(x) Values (5),(1),(2),(3); select l.x, r.x x2,coalesce(l.x,r.x) ,coalesce(r.x,l.x) from @R l full join @r2 r on l.x = r.x where coalesce(l.x,r.x) = coalesce(r.x,l.x) select l.x, r.x x2,coalesce(l.x,r.x) ,coalesce(r.x,l.x) from @R l, @r2 r where coalesce(l.x,r.x) = coalesce(r.x,l.x)