I insert one row into the database using the following method for an android project.
myDB.execSQL("INSERT INTO "
+ Buss
+ " (BussName, RouteName)"
+ " VALUES ('buss1', 'buss2');");
It works great. And I see this link Insert multiple rows into sqlite database . and I try this method (insert multiple lines) in my Android project, but it does not work.
myDB.execSQL("INSERT INTO "
+ Buss
+ " (BussName, RouteName)"
+ " VALUES ('buss1', 'buss2'),('buss1', 'buss2'),('buss1', 'buss2');");
How to do it?
source
share