What exactly is GUID? Why and where I should use it?

后端 未结 15 2246
走了就别回头了
走了就别回头了 2020-12-13 07:48

What exactly is GUID? Why and where I should use it?
I\'ve seen references to GUID in a lot of places, and in wikipedia, but it is not very clear telling you where to

15条回答
  •  庸人自扰
    2020-12-13 08:34

    I worked on an ACD call center system a few years back where we wanted to gather call detail records from multiple call processors into a single database. I setup a column in MS SQL to generate a GUID for the database key rather than using a system-generated sequential ID (identity column). Back then, this required setting the default value to NewID (or generating it in the code, but the NewID() function was safer). Of course, having a large value for a key may raise a few eyebrows, but I would rather give up the space than risk a collision.

    I didn't see anyone address using a GUID as a database key so I thought it might help to know you could do that too.

提交回复
热议问题