###检索
可以用contains来使用oracle的全文检索:
select * from YU_TEST where contains(name,'重庆')>0;
这样查出来的数据是没有经过排序的,有时候我们的需求是按照关键字的匹配程度排序,使用下面的语句:
select score(1),y.* from YU_TEST y where contains(name,'重庆',1)>0 order by score(1) desc;
###检索
可以用contains来使用oracle的全文检索:
select * from YU_TEST where contains(name,'重庆')>0;
这样查出来的数据是没有经过排序的,有时候我们的需求是按照关键字的匹配程度排序,使用下面的语句:
select score(1),y.* from YU_TEST y where contains(name,'重庆',1)>0 order by score(1) desc;