January 28, 2009 at 9:47 am
If you were going to convert a guid to a varchar would the conversion not be a varchar(36)?
January 28, 2009 at 9:54 am
wierd, i've always used a varchar(40) for GUIDS/NEWIDs, but when i run this code, you are right, they are always 36 characters:
declare @newid varchar(200)
select @newid = newid()
select len(@newid) as lengthofGUID,@newid as GUID
Lowell
January 28, 2009 at 2:58 pm
timscronin (1/28/2009)
If you were going to convert a guid to a varchar would the conversion not be a varchar(36)?
Probably not... since all GUID's are 36 characters, why not save the tiny bit of overhead and use CHAR(36)?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply