source table:
DDL:
     "create table xxx_table(id interger primary key autoincrement, field1,
field2)"

int ret = sqlite3_exec(m_db,"attach './backup.db' as filedb",0,0,NULL);
ret = sqlite3_exec(m_db,"begin transaction",0,0,NULL);
ret = sqlite3_exec(m_db,"create table filedb.xxx_table as select * from
xxx_table",0,0,NULL);
ret = sqlite3_exec(m_db,"commit transaction",0,0,NULL);
ret = sqlite3_exec(m_db,"detach filedb",0,0,NULL);

destination table:
DDL:
     "create table xxx_table(id interger , field1, field2)"

use this way to back up a table, lost the primary key property.

How to configure its?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to