SQLite Unique Key with a combination of two columns

前端 未结 1 862
有刺的猬
有刺的猬 2020-12-30 11:17

I\'m trying to make sure when I run the following query only the first INSERT INTO will work.. I know I have to make slot UNIQUE

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 11:53

    Add to your ddl

    create table ... ( ...
    ...,
    unique(slot, player));
    

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