MySQL get data from another table with duplicate ID/data

Posted by steamboy on Stack Overflow See other posts from Stack Overflow or by steamboy
Published on 2010-04-08T19:31:44Z Indexed on 2010/04/08 19:43 UTC
Read the original article Hit count: 296

Filed under:
|

How to query data from table_1 which ID is not available on table_2 that has duplicate ID's. See example below.

I want to get ID 5 and 6 of Table 1 from Table 2

**Table 1**
ID Name
1 a
2 b
3 c
4 d
5 e
6 f

**Table 2**
Table 1 ID
1
1
2
2
2
3
4

Thanks!

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql