Formating UUID String without REGEXP_REPLACE and PL/SQL
问题 I'd like to format the result of the sys_guid() function such as proposed in this answer 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 From performance reasons I'd like to avoid the usage of regexp_replace (as I process large number of records). My scenario can be simplified to this use case: select rawtohex(sys_guid()) GUID from dual connect by level <= 2; Obviously I can't use