UUID_BLOB Function
Converts any universally unique identifier (UUID) into a compact 16-byte blob representation.Syntax
UUID_BLOB(input)Parameters
- input: text or blob
If input is text, then it must contain exactly 32 hexadecimal digits (0-9, A-F). Optionally, it may contain hyphens to separate blocks of digits and curly braces at the beginning and end. If input is a blob, then it must be exactly 16 bytes.
Return Value
The input UUID in blob format.
Example
DECLARE @a = UUID_BLOB('A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11');
SELECT TYPEOF(@a), @a;