I have seen many situations before in which a PK is really a Guid without any default value, and therefore the developer would generate random Guids and employ these to place in to the database.

I have frequently wondered what's the possibility they would produce a number that already been around?

Some Good Info: The amount of values 16 bytes holds is 2^128.

Total = quantity of total values that may be symbolized

Actual = quantity of values that happen to be used

The prospect of placing an ID right into a table that already is available might be developed because the following:

1 - (Total - Actual) / Total

I have done some preliminary information and I have develop the next:

Say you'd a table which had ten million records already within the table, then your probability could be

1 - (2 ^ 128 - 10,000,000) / 2 ^ 128

that is appromixately


I believe now we all know why it's stated that:

"While each produced GUID isn't certain to be unique, the entire quantity of unique secrets is really large that the prospect of exactly the same number being produced two times is infinitesimally small"

from the wiki