我有這個表如何查詢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分成績的學生 –