Interview

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @t1 as table(val int);
insert into @t1(val)
select 100 union all
select 200 union all
select 300 union all
select 400;

declare @t2 as table(val int);
insert into @t2(val)
select 300 union all
select 400 union all
select 500 union all
select 600;

select coalesce(t1.val, t2.val) as val
from @t1 as t1
full outer join @t2 as t2
on t1.val = t2.val
where t1.val is null or t2.val is null;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results