> Is there way how to store numeric values, which are out of REAL range ?

SQLite has no way of storing numbers other than REAL or INTEGER. If
you want the exact number to be stored your only option is to store it
as TEXT (and don't work with it as a number on SQL level).


Pavel

On Tue, Mar 22, 2011 at 2:51 AM, LacaK <la...@zoznam.sk> wrote:
> Hi,
> I have table like this:
> CREATE TABLE tab1 (
>  a INTEGER,
>  c DECIMAL(30,7),
>  ...
> );
>
> When I am trying insert values like:
> INSERT INTO tab1 (a,c) VALUES(1, 123456789123456789.123456);
> INSERT INTO tab1 (a,c) VALUES(2, '123456789123456789.123456');
>
> values for c column are always rounded or cast to :
> 1.23456789012346e+19
>
> If I understand correctly column c has NUMERIC affinity, but when storing
> values, they are stored using REAL storage class.
> But why, when conversion from TEXT is NOT lossless ? (AFAIU first 15
> significant digits are not preserved)
> Is there way how to store numeric values, which are out of REAL range ?
>
> TIA
> -Laco.
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to