sqlite创建表并复制表结构

1、 安卓sqlite创建表结构并复制表中记录语句:

   String createSql = "CREATE TABLE " + toTable + " AS SELECT * FROM " + fromTable;

2、表已存在,复制A表记录到B表中

   String insertSql = "INSERT OR IGNORE INTO " + toTable + " SELECT * FROM " + fromTable;

posted @ 2019-06-26 11:39  zhenxiangyue  阅读(1796)  评论(0编辑  收藏  举报