Table A
(id, name)
1 | alice
2 | bob
Table B
(a_id, last_name)
1 | in wonderland
I want to know the SQL query (using joins) to get the result of “items in A that are not connected to B”
a.2|a.bob
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.
A left outer join will join two tables and return nulls for the second table in the JOIN if there is not a row that matches the join condition. After that you just specify a filter in your WHERE clause indicating that you want only records where the joined table records are null.