Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Your opinion: GUID or IDENTITY as primary key?

Status
Not open for further replies.

john76

MIS
Oct 2, 2003
182
US
In the interests of continuing our fine discussions of individual preferences towards database development, what is your preference for the primary key data type? GUID or int IDENTITY?

John
 
I prefer IDENTITY, only because it allows me to read back the data later easily. I have seen many requests for data and being able to quickly get and read that ID is nice for me...
 
I like identity because it also definitively nails down row insert order. And if I ever have to do ad-hoc queries of my database it sure is easier to type
[blue]WHERE ID = 3127492418[/blue]
than
[blue]WHERE ID = '{FB6BA828-E616-11D1-8D27-00AA00B5BADA}'[/blue].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top