How should I store a GUID in Oracle?

Shaun Bowe picture Shaun Bowe · Sep 30, 2008 · Viewed 65.1k times · Source

I am coming from the SQL server world where we had uniqueidentifier. Is there an equivalent in oracle? This column will be frequently queried so performance is the key.

I am generating the GUID in .Net and will be passing it to Oracle. For a couple reasons it cannot be generated by oracle so I cannot use sequence.

Answer

Turnkey picture Turnkey · Sep 30, 2008
CREATE table test (testguid RAW(16) default SYS_GUID() ) 

This blog studied the relative performance.