Is mysql auto increment safe to use as userID?

后端 未结 5 1259
刺人心
刺人心 2021-01-04 14:54

I am working on website that allows people to create profiles online. I was wondering if it is the right choice to use MySQL AUTO_INCREMENTed IDs as my user ids

5条回答
  •  梦毁少年i
    2021-01-04 15:31

    Given you are planning ahead and potentially would be distributing the data across databases, you would be better considering using the UUID() function to get unique identifiers. This makes the merging of data far easier in the future.

提交回复
热议问题