SQLite Forum

Division by decimals wrongly returning a rounded int result (works fine when casting to real)
Login
Your expectations need some adjustment to incorporate the fact that there is no "decimal" type in SQLite. I suggest a study of <u>[Affinity of expressions](https://sqlite.org/datatype3.html#expraff)</u>, at least. Better would be the whole page.

(Later addition in light of Richard's reply:)

When you write "decimal" (or "DECIMAL" or other casings thereof) as the column type, it resolves to NUMERIC per the 5th rule in section 2 of the doc we linked. There is no decimal type; I suspect Richard meant to say that values are stored into a NUMERIC column using an integer representation when they can be.