答案 0 :(得分:0)
请尝试以下方法。它列出了所有问题都得到解答的所有PSPID。
SELECT DISTINCT qq.PSPID
FROM PSP_QUESTION_MASTER AS qq
WHERE NOT EXISTS (SELECT q.QUESTIONID FROM PSP_QUESTION_MASTER AS q
WHERE q.PSPID = qq.PSPID
EXCEPT
SELECT a.QUESTIONID FROM PSP_ANSWER_MASTER AS a
WHERE a.PSPID = qq.PSPID);