易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle 存储过程中应用事务的问题 - Oracle / 开发

SQL code:

CREATE OR REPLACE PROCEDURE usp_refreshTopN IS
BEGIN
--文档
INSERT INTO topnresource(resourceId,title,type,cover,brief,properUser,tag,clickAmount,createDate,topNCreateDate,organization,topnType)
SELECT A.* from (SELECT resourceid,title,type,cover,brief,properuser,tag,clickamount,createdate,sysdate,organization,2 from resources WHERE refer = 1 AND type = 1 ORDER BY createdate DESC) A WHERE ROWNUM<=20;
--旧的信息,从第11条到第20条
DELETE from topnresource tpr WHERE tpr.topnresourceid IN (SELECT b.topnresourceid from(SELECT rownum myno,a.topnresourceid from (SELECT * from topnresource ORDER BY createdate DESC) a) b WHERE myno>10 AND myno<=20) AND tpr.topntype=2;
--课程
INSERT INTO topnresource(resourceId,title,type,cover,brief,properUser,tag,clickAmount,createDate,topNCreateDate,organization,topnType)
SELECT A.* from (SELECT resourceid,title,type,cover,brief,properuser,tag,clickamount,createdate,sysdate,organization,1 from resources WHERE refer = 1 and type = 4 ORDER BY createdate DESC) A WHERE ROWNUM<=20;
--旧的信息,从第11条到第20条
DELETE from topnresource tpr WHERE tpr.topnresourceid IN (SELECT b.topnresourceid from(SELECT rownum myno,a.topnresourceid from (SELECT * from topnresource ORDER BY createdate DESC) a) b WHERE myno>10 AND myno<=20) AND tpr.topntype=1;

--社区热门文档
INSERT INTO topnresource(resour


相关问答:

oracle与aix - Oracle / 高级技术

在系统运行的时候总是有一块磁盘始终闪红灯,进入系统后
#topas查看总是有一块磁盘%BUSY为90%以上,
数据库版本:oracle 9.2.0.7 
数据文件挂载的节点:/oradata/pcs/ 逻辑卷号lv04 
#lslv -l lv04 ......

oracle 安装 01092 错误 - Oracle / 基础和管理

oracle 11g 安装 01092 错误,
日志信息:
[oracle@linux trace]$ vi alert_orcl.log 
MMON started with pid=14, OS id=9089
RESETLOGS after incomplete recovery UNTIL CHANGE 522752
Errors in file / ......

oracle 10g data guard - Oracle / 基础和管理

做玩data guard 后
在Primary服务器 执行 
SQL>SELECT SEQUENCE#,APPLIED from V$ARCHIVED_LOG ORDER BY SEQUENCE#;
 SEQUENCE# APP
---------- ---
  13 NO
  13 YES ......

一条 SQL - Oracle / 基础和管理

有这样一条SQL
 Select Get_Costtaxrate(col1), Get_Tcostvalue(col1) from a
 
其中Get_Costtaxrate、Get_Tcostvalue都是函数,这两个函数里面都是查找一个大表,Get_Tcostvalue还需要调用Get_C ......

oracle 11g无法安装 - Oracle / 基础和管理

oracle 11g安装先决条件检查全部失败,详细信息如下:
//物理内存
物理内存 - 此先决条件将测试系统物理内存总量是否至少为 922MB (944128.0KB)。
预期值
 : N/A
实际值
 : N/A
 错 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号