Jeśli chcesz ten format, wypróbuj to:
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
Przykładowe wyniki:
FORMATTED_GUID
------------------------------------
F680233E-0FDD-00C4-E043-0A4059C654C9