17,377
社区成员
发帖
与我相关
我的任务
分享
create table t(id number,docs varchar2(1000));
insert into t values(1,'IT IS A EXAMPLE FOR QUERY TEMPLETE.');
insert into t values(2,'USING THE TEMPLETE CONTAIN OPERATION CAN BE PERFORM ON CTXCAT INDEX.');
insert into t values(3,'AND THE CATSEARCH OPERATION CAN BE PERFORM ON CONTENT INDEX.');
create index ind_docs on t(docs) indextype is ctxsys.context;
select id from t
where contains(docs,
'<query>
<textquery>XML or Java</textquery>
</query>')>0;
select id from t where contains(docs,'$USE',1)>0;
为什么能查出第二条记录。select id from t
where catsearch(docs,
'<query>
<textquery>XML or Java</textquery>
</query>',null)>0;