MS SQL Server Row GUID Column

instantmusic picture instantmusic · Dec 14, 2010 · Viewed 28.2k times · Source

I apologize for asking what seems like a tired question, but no forum response or documentation I've read seems to provide an adequate answer.

What is the purpose of the Row GUID Column property in MS SQL Server 2008?

Let me extend on that. I've seen "Don't use GUID as the PK" repeated as the answer for this question, which seems to be completely unrelated to me. If I set Row GUID Column is it forcing that GUID column to be the primary key or something?

To rephrase my original question: If I have a GUID column in my table that does not play any role in indexing, do I stand to gain anything from setting that GUID column as the Row GUID Column?

Answer

suhprano picture suhprano · Dec 14, 2010

It enables you to use the $ROWGUID variable instead of the column name. It's used mostly for merge replication. It doesn't force the GUID column for PK, you can only declare PKs explicitly. The answer to your last question is no, unless you plan on implementing Merge Replication.