I write this post is just to make a summary of a point met this week.寫得不好的話,請園子裡的朋友們多提意見。這個星期的工作遇到需要給Pakage加一個function,這個 function需要動態組織Sql ,以實現不同的 logic.In oracle, we know that:EXECUTE IMMEDIATE代替了以前Oracle8i中DBMS_SQL
java調用oracle函數返回結果集時間:2010-08-27 10:19:50來源:網路 作者:未知 點擊:208次 CREATE OR REPLACE PACKAGE MY_STEEL_SOFTAS --預存程序返回資料集的類型 TYPE ReturnDataSet IS REF CURSOR;CREATE OR REPLACE PACKAGE MY_STEEL_SOFTAS --預存程序返回資料集的類型 TYPE ReturnDataSet IS REF CURSOR;END MY_
3.1 對象的定義對象可以嵌套,而且嵌套級數不限。1. 常式:-- 建立對象頭CREATE OR REPLACE TYPE test_obj IS OBJECT(m_Name VARCHAR2(30),m_id NUMBER,MEMBER PROCEDURE GetName(p_id IN NUMBER, p_name OUT VARCHAR2),MEMBER FUNCTION GetName(p_id NUMBER) RETURN VARCHAR2,MEMBER PROCEDURE
CREATE OR REPLACE TYPE wm_concat_impl AUTHID CURRENT_USERAS OBJECT ( curr_str VARCHAR2 (32767), STATIC FUNCTION odciaggregateinitialize (sctx IN OUT wm_concat_impl) RETURN NUMBER, MEMBER FUNCTION odciaggregateiterate ( SELF IN
一、測試declare l_card_id number; v_result varchar2(1000);begin select t.card_id into l_card_id from ( select t.rowid from sup_card t where t.card_id = 41 order by t.card_No desc,t.up_load_date asc ) R
資料庫壞得只剩下不完整的資料檔案時,可以考慮使用這些資料檔案建立一個新的資料庫。兩個連結:How to and when to recreate control files. http://www.dbasupport.com/forums/showthread.php?s=&threadid=34259 http://www.dbasupport.com/forums/archive/index.php/t-34966.html第二個文章中提到:利用 datafile
第一步:建立一張測試表如下create table KING( ID NUMBER(10), NAME NVARCHAR2(2000))第二步:建立序列create sequence KING_TB_SEQminvalue 1maxvalue 9999999999start with 21increment by 1cache 20;第三步:建立相應的觸發器create or replace trigger king_tb_tribefore insert on Kingfor
D:\oracle\ora92\bin>sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 8月 16 11:32:22 2007Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.SQL> conn /as sysdba已串連。SQL> alter user system identified by