Oracle: LONG or CLOB?

Of these two threads

  • Why is LONG a problem with Oracle?
  • Can I read CLOB from a remote Oracle database?

LONG is archaic and obsolete. Oracle says

Do not create tables with LONG columns. Use large object columns (CLOB, NCLOB) instead. LONG columns are only supported for backward compatibility.

Oracle also recommends converting existing LONG columns to LOB columns. LOB columns are much less restrictive than LONG columns. In addition, LOB functionality is expanded in each version, while the LONG function was static for several releases.

But you cannot read CLOB from a remote database without the workarounds mentioned here .

Which one should I store in my tables? Or is there a better solution than these two?

+7
database oracle clob
source share
2 answers

Use CLOB. One of the limitations of LONG is that LONG cannot be correctly processed from SQL - PL / SQL.

For a more detailed description of the differences, see http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28393/adlob_tables.htm#insertedID2

+4
source share

If Oracle says the feature is deprecated, it may not be available in a future release. Therefore, if your application does not work in the current version of Oracle for an unlimited time, do not use outdated functions.

+3
source share

All Articles