Wednesday, 11 November 2009

Set Operation EXCEPT - SQL

The following returns customers that have made no orders:


SELECT customerid FROM dbo.Customers
EXCEPT
SELECT customerid FROM
dbo.Orders

No comments: