2017-09-06 23:58 GMT+02:00 R Smith <rsm...@rsweb.co.za>:

> On 2017/09/06 11:37 PM, Cecil Westerhof wrote:
>> But should in the first case the 0 not be cast to a 0.0?
> What makes you believe SQLite should massage the data into specific types
> for you without you requesting it explicitly?

​At https://www.sqlite.org/datatype3.html I read:
A column with REAL affinity behaves like a column with NUMERIC affinity
except that it forces integer values into floating point representation.​

> In fact, that would consume valuable extra CPU cycles and would definitely
> make most of us unhappy.
> Your CHECK constraint should really find that the value is acceptable when
> it is either a REAL, OR an INT, because both those types of data satisfies
> your requirement.

​Because of the above I thought it not necessary.

I could change it of-course. The only thing could be if they enter am
integer, then maybe they made a mistake.

Cecil Westerhof
sqlite-users mailing list

Reply via email to