mercredi 4 mai 2016

SQLite inserting large number of records

In my android app I am trying to insert 60 records via one sql command

INSERT INTO table (title, type, name, location) VALUES
('title_1', 'type_1', 'name_1', 'location_1'),
('title_2', 'type_2', 'name_2', 'location_2'),
('title_3', 'type_3', 'name_3', 'location_3'),
.....
('title_60', 'type_60', 'name_60', 'location_60');

But, it gives me an error:

android.database.sqlite.SQLiteException: all VALUES must have the same number of terms (code 1)

What does it mean ?

Aucun commentaire:

Enregistrer un commentaire