MYSQL语句中查询字段中大于某个数且小于某个数之间的条件怎么设定

2024-12-20 09:24:05
推荐回答(3个)
回答1:

SELECT * FORM tables WHERE `price ` between 1000 and 2000

between and 是包含1000和2000

或者

SELECT * FORM tables WHERE `price `>1000 and `price `<2000

回答2:

price>1000 and price<2000
price between 1000 and 2000(1000<=price<2000 )

回答3:

SELECT * FORM tables WHERE price > 10000 and price < 20000