Use multiple columns as unique identifier for mysql

后端 未结 2 1182
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 14:47

I have a mysql table with the following columns:

group_id
game_id
user_id
message
last_update

I want to make it so that no two rows can exi

2条回答
  •  情歌与酒
    2020-12-04 14:50

    well for this you can create composite key of group_id and user_id using any mysql editor like phpmyadmin or sqlyog, and mark it as unique index.

提交回复
热议问题