Another example: CREATE TABLE a ( id int, flags int ); INSERT INTO a VALUES(1, 0); INSERT INTO a VALUES(2, 1);
CREATE TABLE b AS SELECT id, (flags & 1) as flag FROM a where (flags & 1) = 1; In following SQL sqlite3_column_type returns null affinity: SELECT b.flag FROM a LEFT JOIN b ON a.id = b.id; Why? All columns are declared as integer. If JOIN is used or table at right side contains joined row (e.g., (1,0) and (1,1)), sqlite3_column_type returns INT64 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users