Tiemogo, Idrissa wrote: > When I derive a table from another table containing blob type. > The describing the new table doesn’t show “blob". > > sqlite> create table t1 (p_id int, geometry blob); > sqlite> pragma table_info(t1); > 0|p_id|int|0||0 > 1|geometry|blob|0||0 > sqlite> create table t2 as select * from t1; > sqlite> pragma table_info(t2); > 0|p_id|INT|0||0 > 1|geometry||0||0
The documentation (<http://www.sqlite.org/lang_createtable.html>) says: | The declared type of each column is determined by the expression | affinity of the corresponding expression in the result set of the | SELECT statement, as follows: | | Expression Affinity Column Declared Type | TEXT "TEXT" | NUMERIC "NUM" | INTEGER "INT" | REAL "REAL" | NONE "" (empty string) "blob" and "" have the same affinity, so this works just fine. For an explanation of dynamic typing and affinity, see <http://www.sqlite.org/datatype3.html>. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users