Douglas
Douglas

Reputation: 1323

Inconsistent results with LIKE clause in a CLOB field

When querying a table with an CLOB field (CONTENT_VALUE) I get the same results for the following statements:

WHERE CONTENT_VALUE LIKE 'Name'

and

WHERE CONTENT_VALUE LIKE '%reallyweird Name'

Both queries return rows where the field's content is 'Name'. This behavior is quite odd to me. Is the LIKE operator meant to behave differently in CLOB and VARCHAR fields?

I'm running the queries on a Oracle Database 10g Enterprise Edition Release 10.2.0.4.0.

Upvotes: 1

Views: 1166

Answers (1)

Marcin Wroblewski
Marcin Wroblewski

Reputation: 3571

Well - this is a bug (Bug 10305573 on support.oracle.com). You can use regexp_like as a workaround.

Upvotes: 3

Related Questions