How to insert multiple values in single cell database table in android?
I am developing an android database application in which i have to add multiple values in single cell of database table like
id| col 1 | col2 | | 1,2,3,4 | a,b,c,d | | 1,1,1,1 | ,x,x,x,x | | | |
i have created the database in SQLite Database Browser
how can i achieve this
You need to serialize the data that you'd like to load into that cell, for example into xml, json, or maybe csv if that suits you. Xml could get a bit messy, for json there's the Gson lib that makes things really easy, and csv is quite straighforward if your data is simple enough.
Use JSON and store it as a String. I would want to seriously take a look why you want to do that though