On 9/29/05, Ralf Junker <[EMAIL PROTECTED]> wrote: > > Unfortunately, this is not true for SQLite3. If you execute the following > SQL commands > > CREATE TABLE t (a REAL, b REAL); > INSERT INTO t VALUES (5, 2); > > both values are stored as INTEGER and not as REAL as one would expect by > the column affinity. In fact, this behaviour is intentional and is stated in > the help as a feature to minimize storage space for INTEGER numbers. >
D:\temp\convention>sqlite3 num.db SQLite version 3.0.8 Enter ".help" for instructions sqlite> CREATE TABLE t (a REAL, b REAL); sqlite> INSERT INTO t VALUES (5, 2); sqlite> select a/b from t; 2 sqlite> insert into t values(5.0,2); sqlite> select a/b from t; 2 2.5 sqlite> I guess if you're going to use sqlite you're going to have to force typing explicitly if you're doing math with the sql engine.