My Oracle Support Banner

Select Statement Returns Different Results Using LIKE Operator and CONTAINS operator (Doc ID 804209.1)

Last updated on APRIL 27, 2020

Applies to:

Oracle Text - Version and later
Information in this document applies to any platform.
This problem can occur on any platform.


A select statement using LIKE operator returns 5 rows:

select text
from text_table
where text like '% S%';
S & A Test Line 1
S & B Test Line 2
S S E B Test Line 3
S SEB Test Line 4
S S E B Test Line 5

Using the contains function returns 1 row:

select text
from text_table
WHERE contains(text,'S%') > 0;
SEB Test Line 4


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.