MS SQL Server行GUID列 [英] MS SQL Server Row GUID Column

查看:85
本文介绍了MS SQL Server行GUID列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很抱歉问一个看起来很疲倦的问题,但是我所阅读的论坛答复或文档都没有提供足够的答案.

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.

MS SQL Server 2008中Row GUID Column属性的作用是什么?

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

让我继续说下去.我已经看到不要将GUID用作PK"作为该问题的答案,这似乎与我完全无关.如果我设置Row GUID Column,是否会强制将该GUID列用作主键或其他内容?

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?

重新表达我的原始问题:如果我的表中有一个GUID列在索引编制中没有任何作用,那么我将从该GUID列设置为Row GUID Column会获得任何收益吗?

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?

推荐答案

它使您可以使用$ ROWGUID变量而不是列名. 它主要用于合并复制. 它不会强制PK的GUID列,您只能显式声明PK. 除非您计划实施合并复制,否则最后一个问题的答案是否定的.

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.

这篇关于MS SQL Server行GUID列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆