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
 Transact-SQL (2000)
 does ident_current() work for uniqueidentifer also
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 09/30/2009 :  14:31:17  Show Profile  Reply with Quote
I have a table where uniqueidentifer is the primary key and is
generated with newid() in default value.
How do I get the last value generated.

Rajesh Halyal

Almighty SQL Goddess

38200 Posts

Posted - 09/30/2009 :  15:46:46  Show Profile  Visit tkizer's Homepage  Reply with Quote
You can't use the identity functions as you've found.

Generate the GUI first and put it into a variable. Use the variable to insert into your table.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
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.02 seconds. Powered By: Snitz Forums 2000