Can you use auto-increment in MySql with out it being the primary Key

后端 未结 6 1672
春和景丽
春和景丽 2021-01-03 08:52

I am using GUIDs as my primary key for all my other tables, but I have a requirement that needs to have an incrementing number. I tried to create a field in the table with

6条回答
  •  北海茫月
    2021-01-03 09:24

    I would lean the other way.

    Why? Because creating a composite key gives the impression to the next guy who comes along that it's OK to have the same GUID in the table twice but with different sequence numbers.

提交回复
热议问题