GUID: varchar(36) versus uniqueidentifier

后端 未结 5 913
北恋
北恋 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:16

    I believe UNIQUEIDENTIFIER was added in SQL Server 2000, so it's possible this application was originally written for SQL Server 7, which didn't support it. But that's just a guess, of course...

提交回复
热议问题