Question: What do
I do
with the utl_raw.cast_to_raw procedure?
Answer: Here we see using
utl_raw.cast_to_raw:
SQL> DECLARE
2
--note that PL/SQL
variable is limited to size 32KB
3
r RAW(32767);
4
BEGIN
5
r :=
UTL_RAW.CAST_TO_RAW('Oracle Utilites Book');
6
dbms_output.put_line(r);
7
8
r :=
UTL_ENCODE.BASE64_ENCODE(r);
9
dbms_output.put_line(r);
10
11
--now pass r into the decode function
12
r := UTL_ENCODE.BASE64_DECODE(r);
13
dbms_output.put_line(r);
14
END;
15
/
4F7261636C65205574696C6974657320426F6F6B
54334A685932786C49465630615778706447567A49454A766232733D
4F7261636C65205574696C6974657320426F6F6B
You cannot directly display data that is stored using
utl_raw.cast_to_raw:
insert into tbl values(1, utl_raw.cast_to_raw('D:\pics\pic1.jpg'));
1 record
created.
sql>select
* from tbl;
sp2-0678:Column or attribute type
can not be displayed by SQL*PLUS
|
|
|
Oracle Training from Don Burleson
The best on site
"Oracle
training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

|
|
|

|
|
Burleson is the American Team

Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
Burleson
Oracle ®
is the registered trademark of Oracle Corporation.
|
|