2014年12月26日
摘要: 如果要DML实现真正意义上的并发,在开始执行需要并发语句前,需要执行开启session并发 ALTER SESSION ENABLE PARALLEL DML; 在执行完语句后,需要执行关闭session并发 ALTER SESSION DISABLE PARALLEL DML;使用并行,加快大量数... 阅读全文
posted @ 2014-12-26 12:55 相约future 阅读(465) 评论(0) 推荐(0) 编辑
  2014年12月23日
摘要: 控制输出结果的缓冲大小由DBMS_OUTPUT.ENABLE控制,buffer size默认为20000,每行最大的限制是32k,后面的一个例子是用来说明存储过程是在缓存了所有数据后才将结果返回。所以当我们使用游标进行输出时,如果结果很多,将会超过这个值报ORA-20000, ORU-10027: ... 阅读全文
posted @ 2014-12-23 08:56 相约future 阅读(366) 评论(0) 推荐(0) 编辑
  2014年12月22日
摘要: 在表中循环插入日期--创建会话级临时表create global temporary table rq(id number primary key ,sj varchar2(20))on commit preserve rowsselect * from rq--循环插入日期declare c_i ... 阅读全文
posted @ 2014-12-22 09:39 相约future 阅读(417) 评论(0) 推荐(0) 编辑
摘要: create or replace procedure pro_tableesists (v_table in varchar2) isv_num number;begin select count(*) into v_num from user_objects where object_name... 阅读全文
posted @ 2014-12-22 09:10 相约future 阅读(245) 评论(0) 推荐(0) 编辑
摘要: listagg( ) within group ( order by ) 与 wm_concat--oracle 11g 及以后适合 最好select spbywslid,listagg(xm,',') within group (order by spbywslid) col_name fr... 阅读全文
posted @ 2014-12-22 09:08 相约future 阅读(10598) 评论(1) 推荐(2) 编辑
  2014年12月19日
摘要: 执行 .sql 文件时,应在 sqlplus 或 cmd 中执行,速度比plsql 中的command window 中书许多,scott 用户下的表删除了 可以执行如下@D:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\scott.s... 阅读全文
posted @ 2014-12-19 13:57 相约future 阅读(690) 评论(0) 推荐(0) 编辑
  2014年12月18日
摘要: impdp system/system@ORCL directory=DATA_PUMP_DIR dumpfile=20141218.dmp remap_schema=HA_WXZJ:ha_wxzj remap_tablespace=ha_wxzj_data:users从一个用户导入到另一个用户,如... 阅读全文
posted @ 2014-12-18 15:08 相约future 阅读(273) 评论(0) 推荐(0) 编辑
  2014年11月28日
摘要: create or replace procedure fenye ( pageSize in number, pageCurrent in number, sumRows out number, pageCount out number, fenye_cursor out sys_r... 阅读全文
posted @ 2014-11-28 22:16 相约future 阅读(130) 评论(0) 推荐(0) 编辑
  2014年11月15日
摘要: create table ttt (id number primary key ,name varchar2(20),age number(2))create or replace trigger gger_tt before insert on tttfor each row when (new... 阅读全文
posted @ 2014-11-15 15:02 相约future 阅读(241) 评论(0) 推荐(0) 编辑
  2014年11月9日
摘要: insert first when deptno=10 then into dept01(id) values(deptno) when deptno=20 then into dept02(id) values(deptno) else into d... 阅读全文
posted @ 2014-11-09 18:07 相约future 阅读(210) 评论(0) 推荐(0) 编辑