Added database/sql

This commit is contained in:
Anonymous
2014-01-17 07:03:16 -07:00
parent 84d3709fdc
commit cf2e16dba2
570 changed files with 84897 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
create table script_log
(
UPDATE_TIME DATE,
OBJECT_ID NUMBER,
SEQUENCE_NO NUMBER,
SCRIPT VARCHAR2(100),
UPDATE_TYPE CHAR(1)
);
create or replace trigger audit_script_insert
before insert on scripts
for each row
begin
insert into script_log values(sysdate, :new.object_id, :new.sequence_no, :new.script,'A');
end;
/
create or replace trigger audit_script_delete
before delete on scripts
for each row
begin
insert into script_log values(sysdate, :old.object_id, :old.sequence_no, :old.script,'D');
end;
/