Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 12/06/2000 :  09:31:01  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Kyle writes "The company I work for has two SQL servers running SQL 7.0. It is sometimes necessary to use the SQL function NEWID() to get a string of random hexadecimal numbers for one of our applications. On one of the servers, successive calls to the NEWID() function result in completely different output, shown below. However, on the other server, successive calls result in output that is almost exactly the same. Any idea what's going on?

First Server: SQL 7.0, Windows 2000


Second Server: SQL 7.0, NT 4.0 SP 5


Chief SQLTeam Crack Dealer

4149 Posts

Posted - 12/06/2000 :  09:31:01  Show Profile  Visit graz's Homepage  Reply with Quote
All I can tell you is that NEWID() is guaranteed to be unique, not random or sequential.
Go to Top of Page

Posting Yak Master

214 Posts

Posted - 12/06/2000 :  13:09:37  Show Profile  Reply with Quote
From Books Online:

The Transact-SQL NEWID function and the application API functions and methods generate new uniqueidentifier values from the identification number of their network card plus a unique number from the CPU clock. Each network card has a unique identification number; network card manufacturers guarantee that no other network card in the next 100 years will have the same number. The uniqueidentifier returned by NEWID is generated using the network card on the server. The uniqueidentifier returned by application API functions and methods is generated using the network card on the client.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000