Is Oracle’s SYS_GUID() UUID RFC 4122 compliant?

If you want that format try this:

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

Example Results:

 FORMATTED_GUID                                                                  
 ------------------------------------
 F680233E-0FDD-00C4-E043-0A4059C654C9  

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)