Is there a way to make an entire MySQL row unique

后端 未结 5 619
醉梦人生
醉梦人生 2021-02-14 04:46

I have a table in MySQL with 30 columns and thousands of entries.
Is there a way I could make every row unique, that means if a row already exists, I should not be able to e

5条回答
  •  时光说笑
    2021-02-14 05:18

    You can hash the data and set the hash value as your PK, this will ensure that the rows are unique.

提交回复
热议问题