通过一个转义符
where col like 'gl\_ba%' escape '\'

解决方案 »

  1.   

    在sqlplus下可以通过show escape看转义符的状态以及值
      

  2.   

    SQL> create table bb (name varchar2(10));Table createdSQL> insert into bb values('gl_balance');1 row insertedSQL>  insert into bb values('glabal');1 row insertedSQL> insert into bb values('global');1 row insertedSQL> select * from bb;NAME
    ----------
    gl_balance
    glabal
    globalSQL> select * from bb where instr(name,'gl_ba')>0;NAME
    ----------
    gl_balance
      

  3.   

    Example:
    To search for employees with the pattern 'A_B' in their name: 
    SELECT ename 
        FROM emp 
        WHERE ename LIKE '%A\_B%' ESCAPE '\';