My Oracle Support Banner

Store Encrypted Data into a VARCHAR2 Column Using DBMS_CRYPTO (Doc ID 580346.1)

Last updated on APRIL 21, 2022

Applies to:

PL/SQL - Version and later
Information in this document applies to any platform.


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.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.