USE pubs
go

-- the old way

-- intersection of authors and publishers over city
SELECT DISTINCT city
FROM authors
WHERE EXISTS
   (SELECT *
   FROM publishers
   WHERE authors.city = publishers.city) 
GO

SELECT city FROM authors
INTERSECT
SELECT city FROM publishers
GO
   
-- difference
SELECT DISTINCT city
FROM authors
WHERE NOT EXISTS
   (SELECT *
   FROM publishers
   WHERE authors.city = publishers.city) 
GO

SELECT city FROM authors
EXCEPT
SELECT city FROM publishers
GO