Igor, thanks for your reply.

I read that too. But it does not make any sense to me as any number will be
truncated according to this definition.

Can you give me an example where an REAL is converted to a TEXT due to a
conversion loss ?




On Thu, Feb 25, 2010 at 12:54 AM, eternelmangekyosharingan <
eternelmangekyosharin...@gmail.com> wrote:

> I'm sorry but I don't get your answer.
> Can you provide further explanations, please ?
>
>
> On Thu, Feb 25, 2010 at 12:40 AM, P Kishor <punk.k...@gmail.com> wrote:
>
>> On Wed, Feb 24, 2010 at 5:22 PM, eternelmangekyosharingan
>> <eternelmangekyosharin...@gmail.com> wrote:
>> > Hello all,
>> >
>> > I create the following table:
>> > sqlite> create table t1(a);
>> > sqlite> insert into t1 values(123456789.123456789);
>> >
>> > I ran the following commands:
>> > sqlite> select * from t1;
>> > 123456789.123457
>> > sqlite> select typeof(a) from t1;
>> > real
>> >
>> > What I expected to get is:
>> > sqlite> select * from t1;
>> > 123456789.123456789
>> > sqlite> select typeof(a) from t1;
>> > text
>> >
>> > since the conversion of 123456789.123456789 to real induce some loss.
>> >
>> >
>> > Can someone help me out to understand the dynamic typing of sqlite ?
>> >
>>
>>
>> sqlite> create table t1(a);
>> sqlite> insert into t1 values ('123456789.123456789');
>> sqlite> select * from t1;
>> a
>> -------------------
>> 123456789.123456789
>> sqlite> select typeof(a) from t1;
>> typeof(a)
>> ----------
>> text
>> sqlite> insert into t1 values (123456789.123456789);
>> sqlite> select * from t1;
>> a
>> -------------------
>> 123456789.123456789
>> 123456789.123457
>> sqlite> select typeof(a) from t1;
>> typeof(a)
>> ----------
>> text
>> real
>> sqlite>
>>
>>
>>
>> --
>> Puneet Kishor
>> _______________________________________________
>> 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