回複誤刪除資料資訊。1、執行 alter table table_name enable row movement;2、執行 FlashBack table table_name to timestamp to_timestamp('2012-05-24 14:59:36','yyyy-mm-dd hh24:mi:ss');查詢曆史操作資料資訊。比較合理的方法是先從閃回區尋找出被誤刪的資料,再將被誤刪的資料插入到原來的表中。 1、執行 select * from A as of
今天一同事問我Oracle PL/SQL如何動態調用預存程序,我覺得應該沒有問題,剛試了一下OK,主要是用execute immediate 文法,注意using裡指定in和out參數,具體測試樣本如下:create or replace function FNC_TEST2(iP1 INTEGER,iP2 integer) return integer is Result integer;begin return(iP1*iP2);end FNC_TEST2;create or
這個預存程序不是我寫的,但是很好使,特別適合剛匯入對象看到滿螢幕的叉。CREATE OR REPLACE PROCEDURE "USER"."RECOMPILE_SCHEMA" IS v_type user_objects.object_type%TYPE; v_name user_objects.object_name%TYPE; v_stat user_objects.status%TYPE; CURSOR c_obj IS SELECT base
create or replace procedure t_ps_TryCalculate(v_date in varchar2)AS/*每月績效校正,根據參數判斷員工業績是否通過。參數:v_date 績效年月*/--定義錯誤變數some_kinds_of_err EXCEPTION; -- Exception to indicate an error conditionv_ErrorCode NUMBER; -- Variable to hold the error message
遇到非常長的SQL語句無法執行該怎麼辦呢?看下面的解決辦法:/*-----------------------------------|執行長SQL,如參數、值非常大----------------------------------------*/CREATE OR REPLACE PROCEDURE SP_EXECUTELOG(SSQL IN VARCHAR2, SLONG IN CLOB) ISBEGIN EXECUTE IMMEDIATE SSQL USING SLONG;
用於where比較條件的有: 等於:=、<、<=、>、>=、<> 包含:in、not in exists、not exists 範圍:between...and、not between....and 匹配測試:like、not like Null測試:is null、is not null 布爾連結:and、or、not萬用字元:在where子句中,萬用字元可與like條件一起使用。在Oracle中: