BISQL #22:Deep dive into GUID in SQL Server
Hi Friends
What is GUID
A globally unique identifier is a unique reference number used as an identifier in computer software. The term GUID also is used for Microsoft’s implementation of the Universally Unique Identifier (UUID) standard.
The value of a GUID is represented as a 32-character hexadecimal string, such as {21EC2020-3AEA-1069-A2DD-08002B30309D}, and is usually stored as a 128-bit integer. The total number of unique keys is 2128 or 3.4×1038. This number is so large that the probability of the same number being generated randomly twice is negligible.
@Wiki:Globally unique identifier – Wikipedia, the free encyclopaedia
Some of the really good post on GUID as follow
- Kimberly L. Tripp | GUIDs as PRIMARY KEYs and/or the clustering key
- MSDN Blogs
- SQL SERVER – GUID vs INT – Your Opinion « Journey to SQLAuthority
- Auto generated SQL Server keys – unique identifier or IDENTITY
- Alberto Ferrari : How are GUIDs sorted by SQL Server?
Script to Generate GUID
DECLARE @guid UNIQUEIDENTIFIER SET @guid = NEWID() PRINT @guid PRINT 'Value of @guidis: '+ CONVERT(VARCHAR(255), @guid)
We must use above script wherever required in our Programming !!!
Hope this helps !!!
For more interesting information on SQL we can also look into similar topics such as
· BISQL # 23 :SQL Server “Denali”: CTP3 now available !!
· BISQL # 24 :ALL Link Resource information for DB,.NET ,BI and Many More..
· BISQL # 25 : Audit Trail Part : I- What is Audit Trailing ?
· BISQL # 26 : Audit Trail Part : II- Implementation of Auto Auditing with Pros,Cons
· BISQL # 27 : Audit Trail Part : III-Implementation of Audit Trailing with CDC
Hope you will like this post on GUID in SQL server.
If you really like reading my blog and understood at least few thing then please don’t forget to subscribe my blog.
If you want daily link and analysis or interesting link go to following website which will give @ your inbox please subscribe our following link resource blog : Link Resource Website
For More information related to BI World visit my Mentalist Blog
Link Resource Blog >> Daily Interesting links
SQL Server Mentalist >> SQL Learning Blog
Business Intelligence Mentalist >> BI World
Connect With me on
Copyright © 2011 – 2012 Vishal Pawar
-
July 20, 2011 at 10:21 amLink Resource # 2 July 21 « Dactylonomy of Web Resource
-
July 31, 2011 at 10:11 pmList of monthly post of MS BI and SQL blog–July 2011 « SQL Server Mentalist
-
July 31, 2011 at 10:19 pmList of monthly post of MS BI and SQL blog–July 2011 « (B)usiness (I)ntelligence Mentalist
-
July 31, 2011 at 10:30 pmList of monthly post of MS BI and SQL blog–July 2011 « Dactylonomy of Web Resource