**Table A**
1
2
3
4
5
6
**Table B**
2
3
5
How can I select for entry IDs that only exist in Table B? In this example, I’m looking for a query that returns 1, 4, and 6.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming the column is named ‘id’, either:
or
You will probably need to test to see which performs best. MySQL can be a bit unpredictable.