UUID_TO_RAW
UUID_TO_RAW
converts the input argument uuid_string
into internal format of RAW(16)
if it passes the check of IS_UUID(uuid_string)
. If the validation fails, it returns an error.
uuid_string
must be in the ASCII character set. The string may optionally enclosed in '{'
and '}'
. It may also contain hyphens. If hyphens are present all four of the must be present and they must in character positions 9, 14, 19, 24 after discarding any braces.
If the input is NULL, it returns NULL.
Example 1
SELECT UUID_TO_RAW ('{82e19137-f810-44ad-b26e-379d828408a1}') FROM DUAL;
The output is:
UUID_TO_RAW('{82E19137-F810-44AD -------------------------------- 82E19137F81044ADB26E379D828408A1
Note that RAW(16)
is converted into printable form.
Example 2
SELECT UUID_TO_RAW('{d20f8c3c-de13-4b95-8d25-eff3fbdb7e71}') FROM DUAL;
The output is:
ERROR at line 1: ORA-62432: {d20f8c3c-de13-4b95-8d25-eff3fbdb7e71} is not a valid UUID value