How to use EXCEPT or INTERSECT with QueryDSL

322 views
Skip to first unread message

google...@sql-workbench.net

unread,
Nov 28, 2016, 8:35:53 AM11/28/16
to Querydsl
Using UNION or UNION ALL is straightforward with QueryDSL (SQL).

But I can't find a way to use the EXCEPT or INTERSECT operators:

select a,b from table_one
except
select x,y from table_two;

(except is standard SQL - in Oracle that would be MINUS - but I didn't find that either)

The same is true for the INTERSECT operator:

select a,b from table_one
intersect
select x,y from table_two;

Is this simply not possible or am I missing something obvious?

Bonus question: if it is possible, how can I distinguish between EXCEPT and EXCEPT ALL?

Reply all
Reply to author
Forward
0 new messages