[英]Select max is returning a wrong value in MySQL
我有上面的表格,我想使用以下查询从where bid_id=60表格出价where bid_id=60获得最高值
where bid_id=60
SELECT MAX(offer_amount) as maz FROM bids WHERE bid_id = 60
问题是我得到的结果是 80 英寸而不是正确的值 7000000
有人知道如何解决这个问题吗?
将offer_amount存储在数字字段中(例如整数或小数),而不是文本。 快速解决方案是在查询中使用CAST()函数将字段的数据类型转换为数字类型。
offer_amount
[英]MySQL select MAX(datetime) not returning max value
[英]MySQL max() - not returning max() value
[英]MySQL procedure returning wrong value (INSERT SELECT confronting)
[英]SELECT statement is MySql returning wrong value using python
[英]Wrong value Max function in MySQL
[英]mysql sum returning wrong value
[英]mysql query returning wrong value
[英]MySQL function is returning wrong value
[英]MYSQL calculation is returning a wrong value
[英]select the max value of varchar in MySQL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.