SQLite autoincrement - How to insert values?

前端 未结 4 1153
悲哀的现实
悲哀的现实 2020-12-03 00:21

I generate a SQLite table (in java):

create table participants (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, col1,col2);

afterwards I try to a

4条回答
  •  萌比男神i
    2020-12-03 01:05

    Have you tried indicating to which fields of the table the parameters you are passing are supposed to be related?

    INSERT INTO table_name (column1, column2, column3,...)
    VALUES (value1, value2, value3,...)
    

    In your case maybe something like:

    INSERT INTO participants(col1, col2) VALUES ("bla","blub");
    

提交回复
热议问题