![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库系统开发_oracle
sky_2018_blue
友好
展开
-
Oracle Minus关键字
//创建表1create table test1( name varchar(10), sex varchar(10), age int);insert into test1 values('luxin','female',25);insert into test1 values('tom','female',26);insert into test1 valu转载 2011-10-28 09:50:17 · 410 阅读 · 0 评论 -
oracle文本导出导入实例
一、导出方法1: spool d:\emp0130.txt select * from emp; spool off方法2: set trimspool on set linesize 420 set pagesize 2000 set newpage 1 set heading off set term off set转载 2012-01-31 21:30:23 · 594 阅读 · 0 评论 -
基于事件驱动的Oracle作业调度
对很多系统而言,作业调度event, 'Scheduler');" target="_self">Scheduler是不可缺少的部分。大数据量集中批量处理、OLAP数据聚集都需要利用业务空闲时段(如夜间)进行处理。Oracle自身提供了较为可靠的运行作业调度器机制,为我们提供了现成的Scheduler组件。 调度作业有两种大类型:基于时间(Time-Based)和基于事件(Event-Ba转载 2012-01-31 20:51:37 · 846 阅读 · 0 评论 -
SQL 中 with as 用法(转)
withsql1 as (select to_char(a) s_name from test_tempa),sql2 as (select to_char(b) s_name from test_tempb where not exists (select s_name from sql1 where rownum=1))select * from sql1ITPUB个人空间2g N转载 2011-12-21 09:51:44 · 9323 阅读 · 0 评论 -
Oracle的table lock
先来一段Oracle Concepts里的话:A table lock can be held in any of several modes: row share (RS), row exclusive (RX), share (S), share row exclusive (SRX), and exclusive (X). The restrictiveness of a table l转载 2011-12-11 10:22:49 · 413 阅读 · 0 评论 -
Oracle的table lock
先来一段Oracle Concepts里的话:A table lock can be held in any of several modes: row share (RS), row exclusive (RX), share (S), share row exclusive (SRX), and exclusive (X). The restrictiveness of a table l转载 2011-12-11 10:21:47 · 659 阅读 · 0 评论 -
在Oracle中重编译所有无效的存储过程
SQL_PLUS中,spool ExecCompProc.sql select 'alter procedure '||object_name||' compile;' From all_objects where status = 'INVALID' and object_type = 'PROCEDURE'; spool off @ExecCompProc.Sql;转载 2011-12-11 09:52:19 · 1023 阅读 · 0 评论 -
PLSQL:if then else语句段
今天,写存储过程时写成了:if...then...else if....else...end if.能编译通过,但是有问题,后来实在是找不到问题怀疑写错了这个语句,后来在网上查了一下,结果不是else if 而是elsif.改过来后就正常了。Oracle/PLSQL: IF-THEN-ELSE StatementThere are three different syntaxe转载 2011-12-05 18:43:09 · 64265 阅读 · 1 评论 -
Oracle %ROWTYPE 用法
Oracle 中 %ROWTYPE: %ROWTYPE:表示该类型为行数据类型,存储的时候为一行数据,一行有很多列,相当于表中的一行数据,也可以的游标中的一行数据。 用到%ROWTYPE作用是:当查询整行的时候(SELECT * FROM EMP;),那么效率比每一个字段对应快。 例如: v_info emp%ROWTYPE; //该类型为emp表中的一转载 2011-12-05 18:45:22 · 26396 阅读 · 0 评论 -
oracle 两表数据对比---minus
1 引言在程序设计的过程中,往往会遇到两个记录集的比较。如华东电网PMS接口中实现传递一天中变更(新增、修改、删除)的数据。实现的方式有多种,如编程存储过程返回游标,在存储过程中对两批数据进行比较等等。本文主要讨论利用ORACLE的MINUS函数,直接实现两个记录集的比较。2 实现步骤假设两个记录集分别以表的方式存在,原始表为A,产生的比较表为B。2.1 判断原始表和比较表的增转载 2011-11-08 18:51:58 · 10243 阅读 · 0 评论 -
Oracle左连接,右连接
数据表的连接有: 1、内连接(自然连接): 只有两个表相匹配的行才能在结果集中出现 2、外连接: 包括 (1)左外连接 (左边的表不加限制) (2)右外连接(右边的表不加限制) (3)全外连接(左右两表都不加限制) 3、自连接(连接发生在一 张基表内) sql标准语法:select table1.column,table2.columnfrom table1转载 2011-12-31 10:36:14 · 762 阅读 · 0 评论