Oracle对CLOB字段进行全文检索
对CLOB字段进行全文检索可以用SELECT语句,但如果使用WHERE子句时必须使用dbms_lob.instr()函数,命令如下:
首先创建一个测试表TEST:
SQL>CREATE TABLE TEST3(A CLOB,B INT,C INT);
然后往表里插入数据:
SQL> INSERT INTO TEST3 VALUES('TEST 测试 CLOB',11111,22222);
1 row created.
SQL> commit;
Commit complete.
对表进行检索:
SQL> SELECT * FROM TEST3 T WHERE dbms_lob.instr(T.A,'TEST',1,1)>0;
A B C
-------------------------------------------------------------------------------- ---------- ----------
TEST 测试 CLOB 11111 22222
相关推荐
昊 2019-12-11
haiross 2020-01-14
silencehgt 2020-04-17
tangjianft 2020-01-03
xiaobing00 2011-02-07
spartmap 2019-11-03
oraclemch 2019-07-05
天涯客Blog 2011-07-31
jbossllx 2018-11-21
HackAge 2018-10-15
talkingDB 2015-01-23
江南一叶 2013-02-23
galoisgodel 2015-06-04
oraclestudyroad 2012-06-17
anshenoracle 2012-02-21
linuxjourney 2013-09-11
cshpanda 2011-11-21