'database/ORACLE'에 해당되는 글 93건

  1. 2015.10.14 SYS_GUID()

SYS_GUID()

database/ORACLE 2015. 10. 14. 08:56
반응형

SYS_GUID

http://docs.oracle.com/cd/B12037_01/server.101/b10759/functions153.htm

 

Syntax

SYS_GUID()

 

Purpose

SYS_GUID generates and returns a globally unique identifier (RAW value) made up of 16 bytes. On most platforms, the generated identifier consists of a host identifier, a process or thread identifier of the process or thread invoking the function, and a nonrepeating value (sequence of bytes) for that process or thread.


Examples

The following example adds a column to the sample table hr.locations, inserts unique identifiers into each row, and returns the 32-character hexadecimal representation of the 16-byte RAW value of the global unique identifier:

ALTER TABLE locations ADD (uid_col RAW(32));

UPDATE locations SET uid_col = SYS_GUID();

SELECT location_id, uid_col FROM locations;

LOCATION_ID UID_COL
----------- ----------------------------------------
       1000 7CD5B7769DF75CEFE034080020825436
       1100 7CD5B7769DF85CEFE034080020825436
       1200 7CD5B7769DF95CEFE034080020825436
       1300 7CD5B7769DFA5CEFE034080020825436
 

 

 
반응형
Posted by 공간사랑
,