title: Which method for generating GUID's is best for ensuring the GUID is really unique?
body: <p>I have been using this for a long long time, but I couldn't find clear explanation on when it is not guaranteed unique. Here are my comments, please correct as you see fit.</p>
  
  <p>Value is guaranteed to be unique(ly created) on the machine it is created. So GUIDs generated by .net app on a machine will never conflict with those that are created by SQL Server on the same machine.</p>
  
  <p>In all other cases there is no guarantee. Theoretically it is always possible that if there are multiple creation sources(say applications on different computers) for the unique identifier field in a db on a different computer, there can be duplicates that'll be inserted. </p>
  
  <p><strong>EDIT</strong>: Apologies for not forming the question properly. I guess I wanted to know the probability of conflicts when generated on the same machine vs different machines, if c#'s <code>Guid.NewGuid()</code>, SQL Server's <code>newid()</code>,<code>newsequentialid()</code> functions or any other functions by different applications are used. The 'already answered' link has one of the replies where it says he actually encountered a case where that happened. Makes you wonder how frequently that can happen. </p>
  
  <p>If I have a table with a uniqueidentifier field as the pk, should I have to worry about checking for uniqueness each time I do an insert by creating a new value either by different apps or SQL Server's functions?</p>