Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 6:Advanced Retrieval Operations > The EXISTS Operator - Pg. 140

140 Chapter 6: Advanced Retrieval Operations The SQL-92 standard added an operator--EXCEPT--that performs a difference operation directly between two union compatible tables. Queries using EXCEPT look very much like a union: SELECT first_name, last_name FROM customer EXCEPT SELECT first_name, last_name FROM customer, sale WHERE customer.customer_numb = sale.customer_numb AND sale_date >= `1-Aug-2013'; Negative Queries using the EXCEPT Operator or SELECT * FROM customer EXCEPT CORRESPONDING BY (first_name, last_name) SELECT * FROM customer, sale