Skip to main content

Generates a 32 sized unique identifier value in SQL Server without the dash separators.

declare @uniqueId nchar(32);
set @uniqueId = REPLACE(CONVERT(nchar(36), NEWID()), N'-', N'');
select @uniqueId; -- > 28F39C8EABA04F02B02EBA1277F00F15