What data type is recommended for ID columns?

后端 未结 9 1664
既然无缘
既然无缘 2021-02-08 04:35

I realize this question is very likely to have been asked before, but I\'ve searched around a little among questions on StackOverflow, and I didn\'t really find an answer to

9条回答
  •  我在风中等你
    2021-02-08 05:18

    A big disadvantage of using GUID keys is that it is difficult to perform "ad-hoc" queries by hand. Sometimes it is very useful that you can do this:

    SELECT * FROM User where UserID=452245

    With GUID keys this can become very annoying.

    I would recommend 64 bit integers

提交回复
热议问题