Tagged Questions
2
votes
1answer
28 views
Are there tips for writing Oracle DDL Triggers for auditing? Or should I just use AUDIT?
I've been tinkering with writing a trigger to log my table creation and manipulation for later tracking and review.
The challenge is that my trigger logic is stored in the same schema on which I've ...
2
votes
1answer
44 views
Testing AFTER INSERT Trigger
I have the following table:
CREATE TABLE Train(
Train_No integer PRIMARY KEY,
Loco_No integer REFERENCES Locomotive(Loco_No),
Back_Loco_No float REFERENCES Locomotive(Loco_No),
...
0
votes
2answers
80 views
PLSQL: BEFORE INSERT Trigger
I am attempting to write my first trigger statement. I am trying to create a trigger that performs a SELECT to get my MAX_TOW_WEIGHT for a LOCO_CLASS, then compare that weight to the TRAIN_WEIGHT. If ...
1
vote
1answer
196 views
Error with Oracle trigger, invalid identifier
I have the following DML statement that is working perfectly, i have tried to make it into a trigger but it isn't working.
DML statement
UPDATE HOLIDAY_RESERVATION R SET SUBTOTAL =
NVL((SELECT ...
3
votes
1answer
233 views
How to qualify variable inside trigger body (PL/SQL )?
I can explicitly qualify variable in the body of stored procedure or function :
create or replace
PROCEDURE ptest AS
int_val INT;
BEGIN
ptest.int_val:=0;
END;
/
How to do the same inside trigger ...
5
votes
3answers
742 views
Alternatives to an INSERT Trigger
Looking for an example code in Oracle to do the same. i.e.
Remove an insert trigger on table T1 whose job is to create a row in T2 based on the derived data. How would this PL-SQL api look like?
...
