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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 GUID as Primary Key and Include in URL

Author  Topic 

Luke101
Starting Member

30 Posts

Posted - 2009-08-16 : 12:37:12
I would like to implememnt guids as a primary key and include them in my URL. I have been reading on the internet the making guids primary keys is a bag idea because the primary key is clustered by default. Just wanted to know what is the best way to implement guid as a primary key?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-08-16 : 12:42:22
Use INT IDENTITY as primary key, and have another column for NEWID() as default value.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Luke101
Starting Member

30 Posts

Posted - 2009-08-16 : 13:59:59
that is a great idea. Thank you
Go to Top of Page
   

- Advertisement -