Oracle9i SQL Reference
Release 1 (9.0.1)

Part Number A90125-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Functions, 97 of 166


REFTOHEX

Syntax

reftohex::=


Text description of functions46a.gif follows
Text description of reftohex

Purpose

REFTOHEX converts argument expr to a character value containing its hexadecimal equivalent. expr must return a REF.

Example

The following example converts the value of mgr to a character value containing its hexadecimal equivalent:

CREATE TYPE emp_type AS OBJECT
   (eno NUMBER, ename VARCHAR2(20), salary NUMBER);
CREATE TABLE emp_table OF emp_type 
   (primary key (eno, ename));
CREATE TABLE dept 
   (dno NUMBER, mgr REF emp_type SCOPE IS emp_table);
INSERT INTO emp_table VALUES (10, 'jack', 50000);
INSERT INTO dept SELECT 10, REF(e) FROM emp_table e;
SELECT REFTOHEX(mgr) FROM dept;

REFTOHEX(MGR)
--------------------------------------------------------------------------
000022020881D5BDBBC83532FCE03408002082543681D5BDBBC83432FCE034080020825436

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback