1
I have the following table in Sqlite:
db.execSQL("create table amc(_id integer primary key autoincrement, nome text not null, contratada text not null, tipo text not null, data text not null, respostas integer not null, resultado float);");
The field respostas
is the following list ArrayList<Integer> respostas = new ArrayList<>();
how can I save the values of this ArrayList<>
on my table amc
in the field respostas
?
Would it be possible?
Will your list array store integers? create an integer column
– Anderson Henrique
@Andersonhenrique Yes, this is already done. I entered more information in my question.
– Lucas Charles
I imagine it would be better to create another table to store the answers. You will need to link using an id (fk / pk) with the amc table. The question is whether you have a limited number of answers.Since they will be a field for each answer in the Answers table.
– Rodrigo Paixão
Do not change the content of the question, if you have a new question, ask a new one.
– Maniero
Is there no need to create another table? If there is not, try to rearrange it there to play in
varchar
even– Wallace Baldenebre