EXCEPT returns any distinct rows from the left query that are not also found on the right query.
INTERSECT returns any distinct rows that are returned by both the query on the left and right.Example
insert into #t(name) values ('2')
insert into #t(name) values ('3')
create table #t1(name varchar(50))
insert into #t1(name) values ('1')insert into #t1(name) values ('2')
insert into #t1(name) values ('5')
select * from #t
exceptselect * from #t1
--Result:
--name
--3
select * from #t
intersectselect * from #t1
--Result:
--name
--1--2
drop table #t
drop table #t1