Running MySQL 4.0.20 on a RHEL3 box.
Hi,
I'm trying to find the data in a table which is common to two or more
ids. Let's say my table looks like this...
---------------
| col1 | col2 |
---------------
| a | 1 |
| a | 2 |
| a | 3 |
| b | 4 |
| b | 2 |
| b | 7 |
| c | 1 |
| c | 2 |
---------------
I'm trying to get the data in col2 that is common for col1....basically,
I want it to return '2' when I do something like:
select col2 from table where col1 = 'a' || col1 = 'b' || col1 = 'c'
(obviously that select doesn't work).
I know this probably sounds confusing, but I'm can't find a better way
to word it...guess that's why my Google searches turned up nothing I
could use. It would be much appreciated if someone could point me to
the documentation on something like this, or give me a nudge in the
right direction. TIA
--
John C. Nichel IV
Programmer/System Admin
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]