分享下自己积累并整理的一些SQLite常用操作以及Tips:1. Add columnALTER TABLE {tableName} ADD COLUMN COLNew {type};2. Delete column, Rename columnsqlite3不允许直接delete, rename column,只能进行以下操作create new table as the one you are trying to change,copy all data,drop old table,rename the new one.example:create table temp(id integer PRIMARY KEY, code varchar(255));
insert into temp(id, code) select id, code from t;3. Rename tablealter table foo rename to bar4. Copy data from one sqlite file to anotherattach 'database2file' as db2;
insert into TABLENAME select * from db2.TABLENAME;5. 导出sqlsqlite3 data.db
>.output dd.sql
&g
...
继续阅读
(4)