Sql Server using DateTime as Primary Key

前端 未结 4 1984
被撕碎了的回忆
被撕碎了的回忆 2021-01-02 00:10

Hi my questions is similar to:

MySQL: Using DATETIME as primary key

But I\'m specifically interested in Sql Server and I want to approach the question practi

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-02 00:34

    If you really want to avoid a surrogate key for this (ID/identity column), I would at least combine the datetime column with the user id column for a composite key. This sounds like a more natural fit for your data.

提交回复
热议问题