create table text_demo (id number primary key, name varchar2(100), description varchar2(4000))
Table created.
insert into text_demo (id, name, description) values( 1, 'Mike', 'Mike lives in Maryland and attended college at James Madison University')
1 row(s) inserted.
insert into text_demo (id, name, description) values( 2, 'Joel', 'Joel lives in Ohio and attended college at The Ohio State University')
1 row(s) inserted.
create index text_demo_idx1 on text_demo(description) indextype is ctxsys.context
Index created.
select * from text_demo where contains( description, 'Maryland') > 0
ID | NAME | DESCRIPTION |
---|---|---|
1 | Mike | Mike lives in Maryland and attended college at James Madison University |
select * from text_demo where contains( description, 'Maryland | Ohio') > 0
ID | NAME | DESCRIPTION |
---|---|---|
1 | Mike | Mike lives in Maryland and attended college at James Madison University |
2 | Joel | Joel lives in Ohio and attended college at The Ohio State University |