Oracle sqlplus: Escape character in sqlplus

To set escape character in sql*plus

set escape
then use the escape character in front of the character you want escaped.

ex.

select *
from table
where field like '_ill' -- will return hill, mill, will

if you really want to search for '_ill', set an escape character as follows

set escape
select * from table where field like '\_ill'; -- the only match is _ill

Comments