<%-- JSP全站自动生成HTML下载新闻系统 V3.1 作者:JSP天空网站长 曹进 QQ:173241393 --%> Oracle:如何对CLOB行字段执行全文检索
 
用户名:
密码:
终身会员
  首页 网络文摘 技术专题 下载中心 JSP培训 公司产品 JSP虚拟主机 技术论坛 会员 JSP免费空间  
  技术文摘: JSP基础 | JSP高级 | JSP环境 | JAVA基础 | JAVA高级 | JAVA工具 | JAVA数据库 | WEB框架 | XML相关 | JAVA考试 | J2EE相关 | J2ME相关 |
  视频下载: 程序设计数据库相关教程计算机基础教程图形图像网络技术网络安全时空书库EasyShop虚拟主机JSP培训技术论坛
  书籍教程: JSP教程Java教程图像软件XML教程数据库教程网页教程工具软件服务器相关ASP教程PHP教程CGI教程.NET教程
  代码下载: ASP代码下载JSP代码下载PHP代码下载CGI代码下载Flash代码C/C++/VCPowerBuilderDelphiVisualBasicVisualFoxpro
您的位置: 首页 -> 文章分类 -> JAVA数据库 -> Oracle:如何对CLOB行字段执行全文检索
 文摘搜索
 
 文摘资源分类
 
 文摘总排行榜TOP10
 
 最新更新文摘TOP10
 

Oracle:如何对CLOB行字段执行全文检索

[来源]www.jspsky.com管理员   [作者]网络文摘   [时间]2005-4-9
推荐等级: 点击:
大家知道,超过4000字的文本一般存储在CLOB中(MSQL、Sysbase是存放在Text中),在目前的Oracle版本(Oracle8i)中,对大字段CLOB仍然不支持在where子句直接的like操作,如何实现对存储在CLOB字段中的内容进行like查找呢?下面的文章或则能给你帮助。虽然在SQL*PLUS中能实现用select直接看到CLOB的内容,但是如何通过DBMS_LOB包实现对中文环境下的CLOB内容的读取我一直没有找到好的方法(使用Documents中提到的Samples只适用英文字符集),这极大的限制了使用第3方软件开发工作的自由度。如果那位仁兄有高招希望Email给我。

表结构:
create table products(
productid number(10) not null ,
name varchar2(255) ,
description CLOB) ;

方法:
SELECT productid, name FROM products
WHERE dbms_lob.instr(products.description,&acute;some text&acute;,1,1) > 0;




下面列出了DBMS_LOB包中的过程函数:

APPEND procedure Appends the contents of the source LOB to the destination LOB.

CLOSE procedure Closes a previously opened internal or external LOB.

COMPARE function Compares two entire LOBs or parts of two LOBs.

COPY procedure Copies all, or part, of the source LOB to the destination LOB.

CREATETEMPORARY procedure Creates a temporary BLOB or CLOB and its corresponding index in the user&acute;s default temporary tablespace.

ERASE procedure Erases all or part of a LOB.

FILECLOSE procedure Closes the file.

FILECLOSEALL procedure Closes all previously opened files.

FILEEXISTS function Checks if the file exists on the server.

FILEGETNAME procedure Gets the directory alias and file name.

FILEISOPEN function Checks if the file was opened using the input BFILE locators.

FILEOPEN procedure Opens a file.

FREETEMPORARY procedure Frees the temporary BLOB or CLOB in the user&acute;s default temporary tablespace.

GETCHUNKSIZE function Returns the amount of space used in the LOB chunk to store the LOB value.

GETLENGTH function Gets the length of the LOB value.

INSTR function Returns the matching position of the nth occurrence of the pattern in the LOB.

ISOPEN function Checks to see if the LOB was already opened using the input locator.

ISTEMPORARY function Checks if the locator is pointing to a temporary LOB.

LOADFROMFILE procedure Loads BFILE data into an internal LOB.

OPEN procedure Opens a LOB (internal, external, or temporary) in the indicated mode.

READ procedure Reads data from the LOB starting at the specified offset.

SUBSTR function Returns part of the LOB value starting at the specified offset.

TRIM procedure Trims the LOB value to the specified shorter length.

WRITE procedure Writes data to the LOB from a specified offset.

WRITEAPPEND procedure Writes a buffer to the end of a LOB. 
[收藏][打印][关闭]
在线咨询服务 在线咨询服务 在线咨询服务 在线咨询服务
Copyright©2005-2006陕西思远数码科技有限责任公司 服务电话:029-88212987 传真:029-88278265 售后服务QQ:173241393
地址:陕西省西安市吉祥路186号太白新苑C座2104 陕ICP备05004508号