Don't use DOUBLE (or FLOAT) for monetary values. Use DECIMAL(...). Two
decimal places ( ,2) suffices for most countries, but not all.
DOUBLE values have been rounded when converted from decimal to binary.
Multiply creates another rounding. The end result may look the same when
converted
Hi
To me it looks like quantity is being multiplied by the price and then added to
total.
Try something like this
SELECT total,(quantity*price) as QP from sales where total !=QP AND salesid=122
On 2012-12-29, at 7:25 AM, Trimurthy wrote:
hi,
i am working with mysql 5.1.36 and i