Search code examples
oracleoracle-sqldeveloper

Edit RAW column in Oracle SQL Developer


I am using Oracle SQL Developer 18.3 but when I want to edit(or insert) a column with RAW datatype it shows the field as read only and does not allow to edit.

As you may know Oracle SQL Developer shows RAW datatype as hex string despite BLOB datatype that it does not show the value but you can download and upload the BLOB data.

I know that I can update(or insert) the RAW data as hex string like this :

CREATE TABLE t1(the_id NUMBER PRIMARY KEY, raw_col RAW(2000));

INSERT INTO t1(the_id, raw_col) VALUES(1, '1a234c');

But I want do it by Oracle SQL Developer GUI.


Solution

  • Sorry, we do not have a 'raw' editor like we have for BLOBs, so it's up to using SQL.

    If you want a reason for that omission, it's partly due to the fact that RAW is not a commonly used data type in Oracle Database.

    Related: if you're talking about LONG RAW We (Oracle) recommend you stop using it, and instead convert them to BLOBs.

    The LONG RAW datatype is provided for backward compatibility with existing applications. For new applications, use the BLOB and BFILE datatypes for large amounts of binary data. Oracle also recommends that you convert existing LONG RAW columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG RAW functionality has been static for several releases.