EXCEPT

When performing multiple queries, use EXCEPT to remove the results of a second query from the results of a first query.

Usage

The EXCEPT function is database independent, but requires database support.

Examples

Example 3-4 shows how to use this JPQL extension.

Example 3-4 Using EXCEPT EQL

SELECT e FROM Employee e
EXCEPT SELECT e FROM Employee e WHERE e.salary > e.manager.salary

See Also

For more information, see: