oracle 中用like检索如何取出全部带有%的数据。(再线等)

rt
---------------------------------------------------------------

like '/%' escape '/'
大概是这个样子吧,呵呵
---------------------------------------------------------------

楼上说的有点不对,如下:
SQL> create table test(a varchar2(20));

Table created

SQL> insert into test values('abc%wjj');

1 row inserted

SQL> commit;

Commit complete
SQL> insert into test values('dfdfdf');

1 row inserted

SQL> commit;

Commit complete
SQL> select * from test where a like '/%' escape '/';

A
--------------------

SQL> select * from test where a like '%%%' escape '';

A
--------------------
abc%wjj

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus