Applies to:

PL/SQL - Version 10.2.0.1 and laterInformation in this document applies to any platform.

Goal

Store encrypted data into a varchar2 column using the DBMS_CRYPTO package. In order to store encrypted data of a RAW datatype in a VARCHAR2 column, you must convert the data using either RAWTOHEX or the UTL_ENCODE package to make it suitable for VARCHAR2 storage.

You cannot directly store the raw encrypted data into a varchar2 column type. This is documented in the PLSQL programmers guide.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a Million Knowledge Articles and hundreds of Community platforms