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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 UNIQUEIDENTIFIER

Author  Topic 

ruan4u
Posting Yak Master

132 Posts

Posted - 2005-05-17 : 15:12:51
When should this data type be used and what are its pros and cons

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-05-17 : 15:43:59
When You need a globally unique surrogate key

rockmoose
Go to Top of Page

ruan4u
Posting Yak Master

132 Posts

Posted - 2005-05-18 : 09:24:59
surrogate key?whats the difference between this a setting PK
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-05-18 : 13:45:32
Surrogate key is a key with no business meaning.
Could You elaborate on your question "pros and cons" in relation to what ?
In relation to for example an identity column :
pros : globally unique
cons : 16 byte storage, unreadable

A table should always have at least one key with business meaning. (apart from any surrogate key)
I.e. something that makes a row unique in the "real" world, not only unique in the database.

rockmoose
Go to Top of Page
   

- Advertisement -