My Oracle Support Banner

How to Use a LONG Column Datatype in 'LIKE' or 'ORDER BY' Clauses? (Doc ID 1390501.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.
***Checked for relevance on 15-Dec-2016***


How to use a long column in 'like' or 'order by' clause?
For example:

SQL> select * from all_triggers
where trigger_body like '%THEN%'; 2
where trigger_body like '%THEN%'
ERROR at line 2:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG

SQL> desc all_triggers
Name       Null?   Type
-------- -------- ----------


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.