473,783 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NEWID()

Is there a limitation of using:

set @sessionID = NEWID()

would there be a simular NEWID() being generated if used in a database
application.

Eugene Anthony

*** Sent via Developersdex http://www.developersdex.com ***
Nov 23 '05 #1
1 2403
Eugene Anthony (so***********@ yahoo.com) writes:
Is there a limitation of using:

set @sessionID = NEWID()

would there be a simular NEWID() being generated if used in a database
application.


It's not exactly clear what you are asking, but if I take wild guess
and the question is whether the same GUID can be generated twice, the
answer is that the likelyhood for this is negligible, 2^-128 is a
very small number.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
9882
by: Spencer | last post by:
Field Names: NOs Code Code1a UniqueID 61 10 888 10 62 10 888 11 63 10 888 12 Logic: If Count(code >1) & Count (Code1a >1) Update the (Nos) to EQUAL the same Value. ALL the Nos for the above examble should be the same value for all three records whether it's 61 for...
0
1369
by: Tech | last post by:
I have a table tblEmails which contains a list of email ids. ID,address_id,list_name is the structure of it. I need to create a sub list for a particular list_name say "Google Customers" , then say my sublist "Random Internal Google customers" should contain 1000 address_ids from "Google Customes" when I create a new sublist say "Random Internal Google Customer 2" I want 1000 address_ids which are not present in the first. Basically I...
1
13295
by: A Rothberg | last post by:
Is it possible to use NEWID() as a parameter to a stored procedure in SQL Server 2000. I keep getting a "Line 1: Incorrect syntax near ')'" error. ALTER PROCEDURE dbo.StoredProcedure1 ( @x uniqueidentifier ) AS /* SET NOCOUNT ON */
9
10272
by: eagle | last post by:
How can I return the new id that is created when an insert command is used? for example: qry = "insert into tblClients (lname, fname) values ('smith', 'joe')" Dim xyz as string = command.executescalar(strconn, commandtype.text, qry) I tried this and received an error "System.NullReferenceException: Object reference not set to an instance of an object" Although the insert does take place. How would I do this? I can't create a
7
8978
by: diffuser78 | last post by:
I recently tried a hand at wxGlade and was happy to see it designs a GUI for you in minutes. I am a newbie Python coder. I am not completely aware of GUI programming. I can easily make menubars etc but I am not too sure sure how to get more windows poppping to get more information. I mean when you click something, a new windows would open and ask for input like that. Since I am using wxGlade and wxPython....can you suggest me a quick...
3
2186
by: Paradyse | last post by:
Excuse my ignorance because I don't do advance db related programming, but have no other choice at the moment. My experience is limited to simple queries. I need to have the following query display the recordset in random order based on RecordID (unique key) if possible. I tried the ORDER BY NewID() at the end and it generated an error (ORDER BY items must appear in the select list if SELECT DISTINCT is specified.) I guess because of the...
2
1755
by: mr.Hyde | last post by:
Hi, I am working with mscrm database. the Accounts has UniqueIdentifierID, so I am trying to use as parameter value in sqlcommand "NewId();", it doesnt works becouse, ExecuteNonQuery pass my parameter as "NewId();" - with quotas. How I can remove quotas from this command? Regards Hyde
3
6043
by: Cindy | last post by:
I'm trying to use the NEWID function in dynamic SQL and get an error message Incorrect syntax near the keyword 'ORDER'. Looks like I can't do an insert with an Order by clause. Here's the code: SELECT @SQLString = N'INSERT INTO TMP_UR_Randoms(Admit_DOCID, Client_ID, SelectDate, SelectType,RecordChosen)' SELECT @SQLString = @SQLString + N'(SELECT TOP ' + @RequFilesST + ' Admit_DOCID, Client_ID, SelectDate, SelectType, RecordChosen...
1
5108
sujathaeeshan
by: sujathaeeshan | last post by:
Hi all, Newid() which creates a unique value of type uniqueidentifier. Is there any possibolities for seeding or incrementing the NEWID() value. For example: create table cust(cust_id uniqueidentifier NOT NULL DEFAULT newid(),cust_name varchar(60) NOT NULL)
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.