Reputation: 1645
i want insert from table A to table B My code:
String sql = "Insert Into B (emsunitcode,gpsacquisition_datetime,insert_datetime) "
+ "Select emsunitcode,gpsacquisition_datetime,update_datetime From A";
database.rawQuery(sql, null);
But it not work. How insert from table A to Table B in sqlite?
Upvotes: 0
Views: 69
Reputation: 152797
Use execSQL()
and not rawQuery()
.
rawQuery()
just compiles the SQL but doesn't run it. execSQL()
both compiles and runs.
Upvotes: 3