SQL: Storing guids
I now have a requirement that a column has to be added to a table that holds a unique ID (guid). This ID is used to match rec开发者_Go百科ords in different tables and databases but there will be NO FK constraints. Would it be better to store the guid as a varchar(32) or as a uniqueidentifier type?
There will be joins done using this column but not on a regular basis. This ID is NOT a PK. I'm asking in terms of storage and performance.
If it's a GUID, store it as a uniqueidentifier
精彩评论