4 ms·
You've checked this? Perhaps you're correct in a general sense, but in this specific case, neither "number" nor "numeric" datatypes show this issue. > sql
by michaelcampbell 3y ago
You've checked this? Perhaps you're correct in a general sense, but in this specific case, neither "number" nor "numeric" datatypes show this issue.
> sqlite3 --interactive ./floats.db
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
sqlite> create table floats(colA number);
sqlite> insert into floats(colA) values (0.1);
sqlite> insert into floats(colA) values (0.2);
sqlite> select sum(colA) from floats;
0.3
sqlite> create table floats2(colA numeric);
sqlite> insert into floats2(colA) values (0.1);
sqlite> insert into floats2(colA) values (0.2);
sqlite> select sum(colA) from floats2;
0.3
sqlite>