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

Answers


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


Need Your Help

Java 8 Supplier without double colon

java java-8 java-stream

I am unable to create a Supplier without using :: notation. All the tutorials seem to be using :: to get the method out.

as3 randomly picking names

actionscript-3 select random pick

I'm making an as3 program, and in it, when a button (instance name "buy") is clicked, 5 names are randomly picked from a list of about 120 names.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.