摘要: 1 一:操作CLOB 2 3 (1)数据库表结构如下: 4 5 6 create table CLOB_TEST 7 ( 8 ID VARCHAR2(5) not null, 9 CONTENT CLOB 10 )11 12 (2)插入CLOB13 14 方法一:第一步插入一个空值,第二步锁住此行,更新clob字段15 16 public static void insertClob(Connection conn,String data) throws Exception{ //这句话如没... 阅读全文
posted @ 2013-01-24 11:04 全力以赴001 阅读(1932) 评论(0) 推荐(0) 编辑
摘要: 1 --创建有大对象字段的一张表 2 create table test001 3 ( 4 fname varchar2(50), 5 content blob 6 ) 7 8 select * from dba_users; 9 10 select * from test001 11 12 --(一)..准备插入大对象 13 --1. 创建文件存放目录(让Oracle管理,该目录) 14 create or replace directory test_dir 15 as 16 'e:\Pictures'; 17 18 --2... 阅读全文
posted @ 2013-01-24 11:01 全力以赴001 阅读(2285) 评论(0) 推荐(0) 编辑
摘要: 1.创建1 create or replace procedure getLog(record_ref out sys_refcursor,inputId in log201112.id%type)2 AS3 begin4 open record_ref for5 select * from log201112 where id=inputId;6 end getLog;7 /2.调用 1 String procedure="{call getLog(?,?)}"; 2 CallableStatement cstmt=conn.prepareCall(procedure); 阅读全文
posted @ 2013-01-24 10:57 全力以赴001 阅读(2306) 评论(0) 推荐(0) 编辑
摘要: 1 --PLSQL编程 2 /* 3 数据类型:表类型基本类似。 4 伪类型(动态类型):%type %rowtype 5 游标(内存指针):cursor 6 7 控制结构: 8 条件判断:if...elsif....else 9 case(精确)判断:case 字段名 when 值1 then ........ else ......10 case(范围)判断:case when 条件1 then ........ else ......11 12 循环:13 1. loop 。。。。 end loop;14 2. while 条件 loop ...... end loo... 阅读全文
posted @ 2013-01-24 10:54 全力以赴001 阅读(517) 评论(0) 推荐(0) 编辑
摘要: 1 --退出所有用户的登录。 2 sqlplus / as sysdba; 3 alter system enable restricted session; 4 alter system set JOB_QUEUE_PROCESSES=0; 5 alter system set AQ_TM_PROCESSES=0; 6 7 --重新登录(关闭dos窗口) 8 sqlplus / as sysdba; 9 alter database character set internal_use ZHS16GBK; 10 11 --启用session12 alter system disabl... 阅读全文
posted @ 2013-01-24 10:51 全力以赴001 阅读(202) 评论(0) 推荐(0) 编辑