On Tue, Jul 06, 2010 at 05:15:46PM -0700, Darren Duncan scratched on the wall: > Simon Slavin wrote: > > SQLite has types. It just doesn't require every value in the same > > column to be of the same type. > > Or to put it another way, every SQLite column *does* have a type,
Not really. SQLite columns have an affinity, which is sorta-kinda a "preferred type." It is not the same thing as an actual type. The only exception is INTEGER PRIMARY KEY columns, which must, in fact, contain nothing but integer values. Actual values must, of course, be one of integer, float, text, BLOB, or NULL, but with the exception of I PK columns, any column can have any value type. The confusing thing is that SQL has "column types" but SQLite doesn't really use them as type definitions. Rather, SQLite uses SQL column types as text notations to determine a column affinity, but the mapping is somewhat indirect as defined in section 2.1 of <http://www.sqlite.org/datatype3.html#affname>. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users