newid() vs newsequentialid() What are the differences/pros and cons?

前端 未结 4 496
温柔的废话
温柔的废话 2020-12-08 10:23

In a database where all of your primary keys are GUIDs, what are the differences/implications and/or pros and cons using newid() versus newsequentialid() as the \"default va

4条回答
  •  抹茶落季
    2020-12-08 10:42

    As I know, NEWID() generates the GUID in random order and NEWSEQUENTIALID() generates the GUID in sequential order. NEWSEQUENTIALID() can be used ONLY in default clause of a table.

提交回复
热议问题