我的数据库表产品中有两列。
price discountpercent
100 10
200 70
我的查询
SELECT * FROM products order by ?
如何以折扣价订购?
使用:
ORDER BY price * (100 - discountpercent) / 100
在这里演示
我的数据库表产品中有两列。
price discountpercent
100 10
200 70
我的查询
SELECT * FROM products order by ?
如何以折扣价订购?
使用:
ORDER BY price * (100 - discountpercent) / 100
在这里演示