Als je dat formaat wilt, probeer dan dit:
select regexp_replace(rawtohex(sys_guid())
, '([A-F0-9]{8})([A-F0-9]{4})([A-F0-9]{4})([A-F0-9]{4})([A-F0-9]{12})'
, '\1-\2-\3-\4-\5')
as FORMATTED_GUID
from dual
Voorbeeldresultaten:
FORMATTED_GUID
------------------------------------
F680233E-0FDD-00C4-E043-0A4059C654C9