-5

我在将数据选择到表格并回显时遇到问题,例如

--------------------------------------
id   |   bought   |   customerName    | 
--------------------------------------
1    |     70     |  customer 1       |
2    |     20     |  customer 2       |
3    |     50     |  customer 3       |
4    |     30     |  customer 4       |
5    |     80     |  customer 5       |
6    |    100     |  customer 6       |
--------------------------------------

我想要做的是通过购买并选择购买 50 到 100 之间的顺序,这将导致

customer 3 --- 50
customer 1 --- 70
customer 5 --- 80
customer 6 --- 100
4

2 回答 2

1

你可以试试这个来选择数据

"SELECT * FROM table_name WHERE bought BETWEEN 50 AND 100 ORDER BY bought ASC"
于 2013-03-04T01:02:37.693 回答
0

试试这个

SELECT * FROM table_name WHERE BETWEEN 50 AND 100 ORDER BY 购买 ASC

于 2013-03-04T01:05:04.887 回答