What is difference between UniqueIdentifier and Identity datatype in sql server.

Posted by Jitendrasoft09 under Sql Server on 3/27/2013 | Points: 10 | Views : 2340 | Status : [Member] [MVP] | Replies : 2
We have a table which contains the uniqueidentifier and identity datatype, wants to know what is the difference and which is to be better use in real time and scenario for database performance.

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Jayakumars on: 3/27/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
refer this

http://www.mssqltips.com/sqlservertip/1600/auto-generated-sql-server-keys-with-the-uniqueidentifier-or-identity/

Mark as Answer if its helpful to you

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 3/27/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Jitendra,

It is better to use Unique identifier as it will never ever repeat in the entire life of the Table and the identity works good when you are not dealing with sensitive matters but when there are sensitive data to be fetched and if you are using query string in front end i would suggest go for uniqueidentfier.

Perfomance will not hamper with Uniqueidentifier

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response