copy table contents blob field will lost in create table as select
(1) By tangdaoyan on 2020-12-09 02:23:41 [link] [source]
I have a table oldTable in database which contents blob field type.When I use create table newTableName as select * from oldTableName, the new table will show the blob field has no type of field. Why the blob type lost?
(2) By ddevienne on 2020-12-09 09:12:54 in reply to 1 [source]
Documented behavior, unfortunately for you:
https://sqlite.org/lang_createtable.html#create_table_as_select_statements
(3) By ddevienne on 2020-12-09 09:14:03 in reply to 1 [link] [source]
The work-around to preserve the blob type is similar to
https://stackoverflow.com/a/49085419/103724