MySQL Forums
Forum List  »  Newbie

getting a subset of records from one table that don't match a second table
Posted by: Nick Abelson
Date: March 30, 2023 07:44AM

Hi
I have two tables: questions and correct questions for user x
I need to get all the questions that aren't in the correct questions table
So i think i need to do this:
get all the questions then looping through all the correctly answered questions for user x to check there is not a match. If there is a match then get the next question and repeat until i don't get a match

is that correct approach? if so how do i do this in sql? if there is a better way how would i do it?

thanks

Options: ReplyQuote


Subject
Written By
Posted
getting a subset of records from one table that don't match a second table
March 30, 2023 07:44AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.