-2
私はそのようなテーブルを持っていますが、UserId 12はlessonId 103ではありませんが、まだ結果が得られているので、結果はUserId 11だけです。T-SQL:同じ列の類似ID
SELECT *
FROM LessonList
WHERE
(LessonId = 102 and LessonValue = 1002)
or
(LessonId = 103 and LessonValue = 1003)
or
(LessonId = 102 and LessonValue = 1008)
出力:私はこのような結果必要
Id UserId LessonId LessonValue
1 11 102 1002
2 11 103 1003
3 12 102 1008
:
Id UserId LessonId LessonValue
1 11 102 1002
2 11 103 1003
おかげ