I am trying to develop a simple Java servlet that calls an Oracle 11g XE database. The database I was provided uses RAW column types for the IDs on all tables.
Initiall
I have Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 and Java 1.6,
this code work good
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("SELECT utl_encode.base64_encode(ID), NAME FROM raw_table");
while (rset.next())
{
Object obj = rset.getString(1);
logger.debug(obj);
}
Also i want to say, that Tom Kyte do not recommended use RAW Type.
Try using RAWTOHEX and HEXTORAW.