Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 910073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:59:06+00:00 2026-05-15T16:59:06+00:00

How are GUIDs generated in SQL Server? I understand that I should use newid()

  • 0

How are GUIDs generated in SQL Server?

I understand that I should use newid(), but what is the algorithm that function uses? Is it a hash of the time/date?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:59:06+00:00Added an answer on May 15, 2026 at 4:59 pm

    The algorithm to create it is described here: http://en.wikipedia.org/wiki/Globally_Unique_Identifier

    Algorithm

    In the OSF-specified algorithm for generating new (V1) GUIDs, the
    user’s network card MAC address is used as a base for the last group
    of GUID digits, which means, for example, that a document can be
    tracked back to the computer that created it. This privacy hole was
    used when locating the creator of the Melissa worm[2]. Most of the
    other digits are based on the time while generating the GUID. V1 GUIDs
    which contain a MAC address and time can be identified by the digit
    “1” in the first position of the third group of digits, for example
    {2f1e4fc0-81fd-11da-9156-00036a0f876a}. V4 GUIDs use the later
    algorithm, which is a pseudo-random number. These have a “4” in the
    same position, for example {38a52be4-9352-453e-af97-5c3b448652f0}.
    More specifically, the ‘data3’ bit pattern would be 0001xxxxxxxxxxxx
    in the first case, and 0100xxxxxxxxxxxx in the second. Cryptanalysis
    of the WinAPI GUID generator shows that, since the sequence of V4
    GUIDs is pseudo-random; given full knowledge of the internal state, it
    is possible to predict previous and subsequent values

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL Server 2008 database table that uses uniqueidentifier as a primary
I'm running NHibernate and SQL Server CE I am trying to use GUIDs as
I have a database table that uses Sql Server 2005's uniqueidentifier column. I know
I'm working on a database in SQL Server 2000 that uses a GUID for
Mathematically I suppose it's possible that even two random GUIDs generated using the built
I'm trying to use EF4 and the supposedly new feature of having GUIDs generated
I am thinking to use a GUID in my .net app which uses SQL
My Entity Framework model is generated from SQL Server database. Since I need to
OK. I've read things here and there about SQL Server heaps, but nothing too
I'm trying to setup the Entity Framework with SQL Server 2008. I'm using Guids

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.