Guid.newGuid()和newid()之间的区别 [英] difference between Guid.newGuid() and newid()

查看:930
本文介绍了Guid.newGuid()和newid()之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你可以帮我确定c#

中的第一个函数和Sql中的第二个函数之间的区别

如果我使用Guid.newGuid()我可以保证如果我将多个数据源分别放在一台机器上,当我将它们连接在一起时,这将不会在ID中发生冲突

i读取Guid的第一个版本根据我认为的机器mac和时间戳生成id我可以确保不同机器上的多个数据源的唯一性吗?

我的第二个问题是如何在C#中确定函数Guid.newGuid的版本

can you help me in determining the difference between the first function in c#
and the second one in Sql
if i use Guid.newGuid() can i guarantee that will be no conflict in ids if i have multiple data sources each one on a machine when i join them together
i read that the first version of Guid Generates the id depending on machine mac and timestamp which i think can insure uniqueness in multiple datasources on different machines am i wrong?
my second question is how can i determine the version of function Guid.newGuid in C#

推荐答案

1.是的,通过使用 Guid 类,结果ID对于所有情况都是唯一的,这是GUID的建议。您可以在 MDSN [ ^ ]。



2.第二个问题不明确。你想检查/做什么?
1.Yes, by using Guid class, the resulted ID will be unique for all cases, and this was the propose of the GUID. You could find detail in the MDSN[^].

2.The second question is not clear. What do you want to check/do?


这篇关于Guid.newGuid()和newid()之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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