Subject Re: [firebird-support] Re: intersect operation
Author Helen Borrie
At 12:40 PM 22/07/2004 +0100, you wrote:
>Nigel Weeks wrote:
> > Students majoring in math AND CS:
> > select Student
> > from MajorsIN
> > where Major = 'math' AND Major = 'CS'
>I am confused - is this a Firebird specific SQL trick that I missed?
>FWICS the where clause should always fail - giving an empty result set.

You're right - it was the wrong logic.
Look at Svein Erling's solution - that's the one you want - an inner self-join.