我有这个表如何查询VARCHAR和int
name | prof |grade
------------------------
yossi math 100
tami math 70
yossi phisic 100
tami phisic 100
oren math 100
oren phisic 80
dor history 70
查询应返回学生的名字已在数学100级和phisic 正确unswer是贝纳 我用下面的
SELECT name FROM [dbo].[Class_grade]
where prof in ('math', 'phisic') and grade = 100
但它返回更多的名字为什么? 什么是正确的查询? 感谢
回答到:“为什么?”是因为您的查询搜索在'数学'或'物理'中获得100分成绩的学生 –