ORACLE中对LONG类型进行处理的方法

原文来自 Techfox IT技术论坛

1.在block中处理:不过PL/SQL代码只能处理不超过32K的数据,超过这个限制,就无法通过PL/SQL来处理。

  1. SQL> SET SERVEROUT ON
  • SQL> BEGIN
  • 2 FOR I IN (SELECT * FROM T_LONG) LOOP
  • 3 IF INSTR(I.LONG_COL, ‘WORLD‘) > 0 THEN
  • 4 DBMS_OUTPUT.PUT_LINE(I.ID);
  • 5 END IF;
  • 6 END LOOP;
  • 7 END;
  • 8 /

复制代码

2.在全文索引的查询语法:SQL> CREATE INDEX IND_T_LONG_COL ON T_LONG(LONG_COL) INDEXTYPE IS CTXSYS.CONTEXT;索引已创建。

  1. SQL> SELECT ID FROM T_LONG WHERE CONTAINS(LONG_COL, ‘WORLD‘) > 0;
  • ID
  • ----------
  • 1
时间: 2024-08-06 00:56:13

ORACLE中对LONG类型进行处理的方法的相关文章

Oracle中的字符串类型及相关函数详解

1.概述 本文介绍String类型及相关的函数,基于当前最新的Oracle 12c 为基础作介绍. 下文将字符串简称为串. Oracle函数的工作方式有两种: 1.根据旧的对象创建新的对象--他们对原来的信息进行修改,如改变字母的大小写. 2.告诉用户有关的信息,如一个单词或句子中有几个字符. 后续会更新另外两种处理文本的方式:Oracle中的正则表达式 和 Oracle Text工具,等文章编辑完成,会在此处添加链接. Oracle中主要有两种字符串类型:CHAR和VARCHAR2,他们以字母

Oracle 中的Interger类型

引自 wolfAone, oracle有没有integer类型,这种类型的最大值是多少啊. Integer是Number类型的子类型: NUMBER Type You use the NUMBER datatype to store fixed or floating point numbers of virtually any size.  You can specify precision, which is the total number of digits, and scale, wh

Oracle中创建自增字段(序列sequence)方法

oracle没有ORACLE自增字段这样的功能,但是通过触发器(trigger)和序列(sequence)可以实现. 下面给大家讲个例子: 1.在Oracle中创建一个表: 1.创建一个表 create table t_client (id number(4) primary key, pid number(4) not null, name varchar2(30) not null, client_id varchar2(10), client_level char(3), bank_acc

Oracle中查询当前时间、时间格式化方法

Oracle中如何获取系统当前时间 select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;  ORACLE里获取一个时间的年.季.月.周.日的函数 select  to_char(sysdate, 'yyyy' )  from dual; --年  select  to_char(sysdate, 'MM' )  from dual; --月 select  to_char(sysdate, 'dd' )  from dual; --

oracle中的number类型

number 数据类型 number (precision,scale) a)    precision表示数字中的有效位,如果没有指定precision的话,oracle将使用38作为精度: b)    如果scale大于零,表示数字精度到小数点右边的位数:scale默认设置为0:如果scale小于零,oracle将把该数字取舍到小数点左边的指定位数. c)    Precision 的取值范围是[1-38];scale的取值范围是[-84-127]. d)    Number整数部分允许的长

在JSP中获取oracle中的时间戳类型的字段并显示

在oracle中有一种特殊的时间显示类型——Timestamp时间戳 通常我们将当前时间转化为时间戳的语法如下: select cast (sysdate as timestamp ) from dual 在一个JSP页面中,需要获取一个时间戳字段,以显示在页面上 首先,是对JDBC的操作 sql语句用: select * from testlibrary 假设testlibrary中的modifydate字段的类型为TIMESTAMP(6) Testlibrary tlb= new Testl

Oracle中的TIMESTAMP类型[转]

原文:http://wangyaobeijing.blog.163.com/blog/static/158330320113276114762/ 1 SQL> create table test_time (col_time timestamp); 2 3 表已创建. 4 5 SQL> insert into test_time values (to_timestamp('0001-1-1 0:0:0.0', 'syyyy-mm-dd hh24:mi:ss.ff')); 6 7 已创建 1 行

oracle中关于clob类型字段的查询效率问题

今天,公司项目某个模块的导出报如下错误: HTTP Status 500 – Internal Server Error Type Exception Report Message Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded Description The server encountered an unexpected condition

如何在Oracle中向Collection类型的变量中逐条插入数据

这篇文章将要介绍如果需要生成一个新的Collection并且向其中添加数据的方法. procedure insert_object(d in dept_array, d2 out dept_array) isbegin --First way to insert data into a new array. SELECT CAST(MULTISET (SELECT DNO, name, location FROM department_teststruct) AS dept_array) INT