Do i have to use _ID as a SQlite primary key? and does it have to be an INT? (Android Dev)

后端 未结 3 1980
梦如初夏
梦如初夏 2020-12-10 15:54

This is probably a silly question but i haven\'t been able to find the answer yet.

I want to use a TEXT column with my own unique names as the primary key in a table

3条回答
  •  执笔经年
    2020-12-10 16:25

    _id must be of type int in sqlite create (long in Java). Various classes assume that. As a result, you cannot use UUID for primary key.

提交回复
热议问题