国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 開(kāi)發(fā) > 綜合 > 正文

如何對(duì)CLOB行字段執(zhí)行全文檢索

2024-07-21 02:39:35
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
大家知道,超過(guò)4000字的文本一般存儲(chǔ)在CLOB中(MSQL、Sysbase是存放在Text中),在目前的Oracle版本(Oracle8i)中,對(duì)大字段CLOB仍然不支持在where子句直接的like操作,如何實(shí)現(xiàn)對(duì)存儲(chǔ)在CLOB字段中的內(nèi)容進(jìn)行l(wèi)ike查找呢?下面的文章或則能給你幫助。 雖然在SQL*PLUS中能實(shí)現(xiàn)用select直接看到CLOB的內(nèi)容,但是如何通過(guò)DBMS_LOB包實(shí)現(xiàn)對(duì)中文環(huán)境下的CLOB內(nèi)容的讀取我一直沒(méi)有找到好的方法(使用Documents中提到的Samples只適用英文字符集),這極大的限制了使用第3方軟件開(kāi)發(fā)工作的自由度。假如那位仁兄有高招希望Email給我。
  
  表結(jié)構(gòu):
  create table PRodUCts(
  productid number(10) not null ,
  name varchar2(255) ,
  description CLOB) ;
  
  方法:
  SELECT productid, name FROM products
  WHERE dbms_lob.instr(products.description,'some text',1,1) > 0;
  
  下面列出了DBMS_LOB包中的過(guò)程函數(shù):
  
  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'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'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.  


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 波密县| 沙洋县| 康马县| 缙云县| 佛坪县| 台安县| 五华县| 甘洛县| 新巴尔虎左旗| 涞水县| 五常市| 上饶县| 微博| 九台市| 孟州市| 刚察县| 广南县| 兰考县| 青浦区| 武宣县| 利辛县| 米易县| 股票| 兴海县| 泾阳县| 芦山县| 丁青县| 庐江县| 阜南县| 渑池县| 齐河县| 蓬莱市| 白玉县| 辽阳市| 广南县| 长武县| 成都市| 浦县| 成都市| 海阳市| 安阳县|