Thank you - I stand corrected - I should really stop quoting from memory!
On this note, a technical question: The data surely is coerced when comparing to another column that has an affinity of not "NONE"
or assigned collation, right?
If so, what about a calculation, i.e the SQL phrase "WHERE F1 > (5 * 0.1)" assuming the F1 column has "NONE" affinity, would the
calculation on the right have any automatic affinity, such as Numeric or Real, and would that inform the comparison?
On 2013/12/09 19:08, Richard Hipp wrote:
On Mon, Dec 9, 2013 at 11:12 AM, RSmith <rsm...@rsweb.co.za
<mailto:rsm...@rsweb.co.za>> wrote:
On 2013/12/09 15:32, Simon Slavin wrote:
First, never do this:
CREATE TABLE IF NOT EXISTS T1(F1,F2,F3,F4,SUBTOTAL);
Always define your column types. In your case you'd be using either
INTEGER or REAL.
Agreed, those Columns have TEXT affinity by default which is wholly
unsuitable for numeric comparisons such as those that
prompted this thread.
The default affinity is "NONE". Which basically means the SQLite leaves your data alone and does not try to coerce it into one
datatype or another.
--
D. Richard Hipp
d...@sqlite.org <mailto:d...@sqlite.org>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users