0

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

1
  • Insert as a string from Java, use join if you have those in an array. Commented Nov 30, 2011 at 7:04

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

1

Use JSON and store it as a String. I would want to seriously take a look why you want to do that though

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.