Jeff Meyer wrote:

I have the following table:
+---------+-------------+
| ID_AGE | ID_ENTRY |
+---------+-------------+
|             1 |                  1 |
|             1 |                  4 |
|             1 |                  5 |
|             2 |                  1 |
|             2 |                  2 |
|             2 |                  3 |
|             2 |                  4 |
|             2 |                  6 |
|             2 |                  7 |
|             2 |                  8 |
|             2 |                10 |
|             2 |                11 |
|             2 |                13 |
|             2 |                14 |
|             2 |                15 |
|             2 |                19 |
|             2 |                20 |
|             2 |                21 |
|             2 |                22 |
|             2 |                24 |
|             3 |                14 |
|             3 |                16 |
|             3 |                17 |
|             3 |                18 |
|             3 |                19 |
|             3 |                22 |
+---------+--------------+

And since INTERSECT is not currently supported how do I select the ID_ENTRY
that has both 1 and 2 for ID_AGE

SELECT ID_ENTRY WHERE ID_AGE = 1
INTERSECT SELECT ID_ENTRY EHRE ID_AGE=2;


The results should be 1 and 4.

Thanks in advanced.

select a.id_entry from idtable a, idtable b where a.identry=b.identry and a.age=1 and b.age=2;










-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to