I'm working with a legacy database that stores GUID values as a varchar(36) data type:
CREATE TABLE T_Rows (
RowID VARCHAR(36) NOT NULL PRIMARY KEY,
RowValue INT NOT NULL
)
INSERT T_Rows (RowID, RowValue) VALUES (NEWID(), 1)
I would assume that storing a GUID as a uniqueidentifier would be preferable since it's only 16 bytes in size as opposed to 36.
Are there any advantages to storing a GUID as a varchar?