【发布时间】:2023-03-16 01:04:01
【问题描述】:
我有一个具有以下结构的学生表。
StudentId StudentName SubjectId
123 Lina 1
456 Andrews 4
123 Lina 3
123 Lina 4
456 Andrews 5
需要编写查询来获取subjectid等于1,3且studentid不等于4的studentId
Select studentId from student where subject Id='1' and SubjectId ='3' and
subjectId ='4' .
输出 studentId 应该是 123
但这并没有成功。任何帮助表示赞赏
【问题讨论】: