xiaochuan 发表于 2018-9-13 11:29:00

oracle escape-pl

  HR@prod> create table test (id number,name varchar2(20));
  Table created.
  HR@prod> insert into test values(1,'abc');
  1 row created.
  HR@prod> insert into test values(2,'a_c');
  1 row created.
  HR@prod> insert into test values(3,'a%c');
  1 row created.
  HR@prod> select * from test;
  ID NAME
  ---------- --------------------
  1 abc
  2 a_c
  3 a%c
  HR@prod> commit;
  Commit complete.
  HR@prod> select * from test where name like 'a%c';
  ID NAME
  ---------- --------------------
  1 abc
  2 a_c
  3 a%c
  HR@prod> select * from test
  2where name like 'a\%c' escape '\';
  ID NAME
  ---------- --------------------
  3 a%c

页: [1]
查看完整版本: oracle escape-pl