0

We have a table called CONTACT_INFO that has a column COMMENTS of type LONG.

These queries work fine:

select comments from contact_info;
select comments from contact_info where rownum <= 3;

However, this query throws ORA-00997:

select comments from contact_info fetch next 3 rows only;

Why?

  • 2
    Avoid the use of the arcane `LONG` type. You are asking for trouble. Use CLOB or BLOB instead. The Oracle metadata uses it sometimes and it's just a pain in the neck to retrieve anything stored in it, or comparing it to other things. – The Impaler Mar 25 '22 at 20:18
  • I haven't been able to reproduce this error in dbFiddle. https://dbfiddle.uk/?rdbms=oracle_18&fiddle=509091be3c92ab15d6238b5b37307fd8 –  Mar 31 '22 at 08:59
  • Please see this post for updating your datatypes https://docs.oracle.com/cd/B19306_01/appdev.102/b14249/adlob_long_lob.htm –  Mar 31 '22 at 09:00

0 Answers0