SQLite:“ALTER TABLE `game` ADD UNIQUE(`name`)” Error in SQLite

前端 未结 1 822
攒了一身酷
攒了一身酷 2020-12-15 09:41

I used the same command syntax above as in Mysql and would like set a unique key for the tables\'s filed on Android Device environment, however, the error prompted in LogCa

相关标签:
1条回答
  • 2020-12-15 10:22

    sqlite support alter in another way. You can try the following: create unique index unique_name on game(name); If you want to create a constraint for two or more columns at one time: create unique index unique_name on game(name1,name2,mame3);

    0 讨论(0)
提交回复
热议问题