當然
但對於剛剛使用ORACLE數據庫後台編程人員來說
ORACLE的觸發器分為兩類
但在實際編程過程中
如
對我們來說
實現此需求
Drop Table xxx;
Drop Table yyy;
Create Table xxx(
xKey Number(
xDate Date
xData number(
Create Table yyy(
xKey Number(
xDate Date
xData number(
Create Or Replace Package Pkg_xxx_Update
as
G_xKey xxx
End Pkg_xxx_Update;
/
Create Or Replace Trigger TRG_Upd_xxx_Rec
After Insert On xxx
For Each Row
Begin
Pkg_xxx_update
End;
/
Create Or Replace Trigger TRG_Upd_xxx_TB
After Insert On xxx
Begin
Update xxx
set
xDate=SysDate
Where
xKey=PKG_xxx_Update
End;
/
<<InsertMultiRecord>>
Declare
L_Count Number:=
Begin
Delete from yyy;
While L_Count<
Loop
insert into yyy
values(
L_Count:=L_Count+
End Loop;
Commit;
End InsertMultiRecord;
Insert Into xxx
(Select * from yyy);
Commit;
Select * From xxx;
From:http://tw.wingwit.com/Article/program/Oracle/201311/18637.html