标签: sql ms-access
我有一张桌子,其中包含学生的详细信息。 例如:
Name Grade Number of subtractions Josef 100 0 Daniel 90 2 Diana 50 100 Koby 30 200
我想获得年级在0到50之间并且减法数在100到200之间的学生的姓名,例如,它将仅重播Diana和Koby。
答案 0 :(得分:1)
使用between和And或Or运算符:
And
Or
select name from studentsdetails where (Grade between 0 and 50) and (NumberOfSubtractions between 100 and 200)
或使用Or:
select name from studentsdetails where (Grade between 0 and 50) Or (NumberOfSubtractions between 100 and 200)