JAVA SQL数据库中两个表比较更新的语句

db.rawQuery("insert into minfo select * from info where name not in(select * from minfo)",null);

两个表比较然后把info表中多出的的name项插入到minfo表中,是这样写吗?求指导啊

报的错是 android.database.sqlite.SQLiteException: only a single result allowed for a SELECT that is part of an expression (code 1): , while compiling: insert into minfo select * from info where name not in(select * from minfo)

minfo,info两个表的表结构是否是一致的?如果不一致,不能直接insert into ...select * from ...,需要把要插入的字段与select 的字段一一对应

参考自:
MySQL insert用法详解 http://www.data.5helpyou.com/article421.html

 not in(select * from minfo)
 内部不能select * ,
 这里需要指明minfo表中对应的name是哪个字段
 not in(select 该字段名 from minfo)