条款不止一个

时间:2010-03-29 11:40:11

标签: mysql between

如何在MySQL查询中使用多个'between'子句?例如,如果我想选择身高在20到25之间,体重在50到70之间的学生。

2 个答案:

答案 0 :(得分:2)

WHERE height BETWEEN 20 AND 25 AND weight BETWEEN 50 AND 70

答案 1 :(得分:0)

WHERE height BETWEEN 20 AND 25 AND weight BETWEEN 50 AND 70

请记住,您的情况是逐一应用于每一行,而不是“同时整个表格”。