GUID: varchar(36) versus uniqueidentifier

后端 未结 5 904
北恋
北恋 2021-02-19 01:15

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,
            


        
5条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 02:13

    Absolutely not, as I'm sure you know legacy databases often suffer from design flaws :P Because GUID is 16 bytes, it might as well take up 16bytes in the database. You'll gain that 20 bytes per entry

提交回复
热议问题