Why minus negative value with SQLite statement getting incorrect result?
See my query at Chrome browser below:- click for image details
Why minus negative value with SQLite statement getting incorrect result?
See my query at Chrome browser below:- click for image details
http://floating-point-gui.de/basic/ might be a good read. SQLite does not have a good mechanism to handle decimal datatypes (high decimal precision). In order to get around this, just create your database to take integers. Store 99.50 as 9950. When extracting data, divide by 100.
A question on dba StackExchange was asked some time back. Although the accepted answer is not a recommended solution, it offers an idea of what is going on with floating points.