=?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?= <lists(at)boutiquenumerique(dot)com> writes:
> I may be mistaken, but you may be doing the same thing twice : you're
> basically writing :
> SELECT DISTINCT X WHERE Y EXCEPT SELECT DISTINCT X WHERE NOT Y
> Is this not a way to get an empty result set ?
No, because some X values may appear in rows where Y, and also in rows
where NOT Y.
The DISTINCTs are wastes of time, though, because EXCEPT implies
elimination of duplicates.
regards, tom lane