Solved

User Generated OID

Posted on 2006-07-19
3
564 Views
Last Modified: 2013-12-11
How can I define an user genarated OID?

For example in IBM's DB2 I have an type to be referenced as (for example VARCHAR) and then by using the sentece REF IS OID USER GENERATED when I define an table of the type, I can refer to an object whith the value of the OID which is VARCHAR.
0
Comment
Question by:panalex
3 Comments
 
LVL 47

Accepted Solution

by:
schwertner earned 125 total points
ID: 17144352
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
. . .
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now