我在连接方面遇到了一个小逻辑问题。我有一个回答答案的数据库。架构是:
Question
question_id
question_text
Answers
answer_id
question_id
answer_text
User Responses
user_id
answer_id
question_id
我正在尝试查找用户尚未回答的问题,但我一直收到无效回复。查询如下:
SELECT * FROM questions
LEFT JOIN responses ON questions.question_id = responses.question_id
WHERE user_id != '1'
我的逻辑哪里出错了?