Is there anyway to search PL/SQL reserved words with the contains
function in the Oracle?
We would like to search keywords such as "test for" or "test do" with the contains
or catsearch
functions from the user table in Oracle but the results only show for "test" and ignore those reserved words such as "do" or "for" automatically.
We assume we have a table called content in the users schema.
The queries are listed below:
create table users.content (content_id int not null, content varchar(20) not null);
insert into users.content values (1, 'do something');
insert into users.content values (2, 'test it');
insert into users.content values (3, 'it has been tested');
insert into users.content values (4, 'will test it');
create index users.idx_content on users.content (content) indextype is ctxsys.context;
--drop index users.idx_content;
--drop table users.content;
select content_id, content from users.content where contains(content, 'do or test') > 0;
v$reserved_words
.