TableA
id, name
1, abc
2, cde
3, def
TableB
id, TableA_id, topic
1, 1, blah
2, 1, blah again
3, 2, abcdef
I want to select all of those records from TableA which dont have any references in TableB. How do I do it in Mysql?
Thanks a lot.
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.
You can use LEFT JOIN and select these records which don’t have matching record in B.