> -----Original Message----- > Bellow, Bambi > > Why not do it like this... > > select usr from gab > where val=1 > intersect > select usr from gab > where val=5 > intersect > select usr from gab > where val=7;
Because that way you would get the wrong answer. With the sample data as kindly provided by Mr. Begun the correct query would return one row, but your query returns two rows. SQL> select * from gab ; USR VAL ---------- --------- GAP 1 GAP 5 GAP 5 GAP 7 PAG 1 PAG 7 PAG 2 JKL 1 JKL 5 JKL 5 GPA 1 GPA 5 GPA 7 GPA 8 14 ligne(s) sélectionnée(s). SQL> select usr from gab 2 where val=1 3 intersect 4 select usr from gab 5 where val=5 6 intersect 7 select usr from gab 8 where val=7; USR ---------- GAP GPA -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jacques Kilchoer INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).