Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
Functions, 97 of 166
reftohex::=
reftohex
REFTOHEX
converts argument expr to a character value containing its hexadecimal equivalent. expr must return a REF
.
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
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|