How to store array in one column in Sqlite3?

后端 未结 4 1009
日久生厌
日久生厌 2020-12-09 14:44

Is there any way to store an array of integers in one column of table? I want o/p like this:

ident | value                                                            


        
4条回答
  •  情书的邮戳
    2020-12-09 15:19

    SQLite3 does not support arrays directly. See here the type it supports. Basically, it only does Ints, Floats and Text.

    To accomplish what you need, you have to use a custom encoding, or use an FK, i.e. create another table, where each item in the array is stored as a row.

提交回复
热议问题