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
 General SQL Server Forums
 New to SQL Server Programming
 how to generate guid in sql server
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 06/11/2008 :  00:06:18  Show Profile  Reply with Quote
Dear Expert,
Iam new to sql server2000

I have table Table1 in that table I want to generate unique guid in one column.I want the code for that one kindly help me.

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 06/11/2008 :  00:14:04  Show Profile  Reply with Quote
use NEWID() function to create unique guid and amke a default for column on it

(uidCol uniqueidentifier DEFAULT NEWID(),
Go to Top of Page

Flowing Fount of Yak Knowledge

1274 Posts

Posted - 06/11/2008 :  00:41:41  Show Profile  Send sunsanvin a Yahoo! Message  Reply with Quote
Dear Puji,
use like this
select newid()
that will give you a newid. so copy that and paste.

Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000