title: What data type is recommended for ID columns?
body: <p><em>I realize this question is very likely to have been asked before, but I've searched around a little among questions on StackOverflow, and I didn't really find an answer to mine, so here goes. If you find a duplicate, please link to it.</em></p>
  
  <p>For some reason I prefer to use <code>Guid</code>s (<code>uniqueidentifier</code> in MsSql) for my primary key fields, but I really don't know why this would be better. In many of tutorials I've walked myself through lately an automatically incremented <code>int</code> has been used. I can see pro's and cons with both:</p>
  
  <ul>
  <li>A <code>Guid</code> is always of the same size and length, and there is no reason to worry about running out of them, whereas there is a limit to how many records you could have before you'd  run out of numbers that fit in an <code>int</code>.</li>
  <li><code>int</code> is (at least in C#) a nullable type, which opens for a couple of shortcuts when querying for data.</li>
  <li>And <code>int</code> is easier to read.</li>
  <li>I bet you could come up with at least a couple of more things here.</li>
  </ul>
  
  <p>So, as simple as the title says it: <strong>What is the recommended data type for ID (primary key) columns in a database?</strong></p>
  
  <p>EDIT: After recieving a couple of short answer, I must also add this follow-up question. Without it, your answer is neither compelling nor educating... ;) <strong>Why do you think so, and what are the cons of the other option that make you <em>not</em> choose that instead?</strong></p>