Asked on 2001-05-29 at 18:55:37ID: 25482300

Statement Triggers vs Row Triggers.

by: sbishop200

Rating8.0Very Good

I need to know some details about statement triggers please.
For example if i have a program that issues an Update Command that creates a number of records, a row trigger will fire once PER record updated.
A Statement level trigger will fire only once per issuing statement.  So if the UPDATE actually updates 5 rows, the trigger will only fire once.
1)  Can a Statement trigger still access values like you can in a Row Trigger - ie :NEW and :OLD record values?
How can the trigger know the details of records that actually fired it?
2)  Can I go and delete records on the same table as the trigger for Statement triggers, even if it was the INSERT of this record(that I am also wanting to delete in my stored procedure called from the trigger) that fired the trigger?  Will it matter if I use a BEFORE or AFTER trigger type to do this?

Previously I've only used ROW triggers and not Statement triggers, but I now have the need to read and delete from the same table that has the trigger on it.(via a call to a stored procedure). I need to do this to avoid mutating table errors.

What I need is to have a trigger that fires on insert or update....then, depending on the value of a field of the record that fired the trigger, call the relevant stored procedure, which will go and read the same table, then delete all of the records on it, including the row that would have fired the statement trigger.

I hope this makes sense.  Any help here will be appreciated.

  1. Need a trigger to update create_ts when a new …
    I need a trigger to update create_ts when a new row is created on emp table. The primary key on emp table is emp_no, and dept_no. Thanks.
  2. Fire Trigger only if PK not specified
    Reference: I have a procedure that enters data into a table. I'm going to change it so that it will also enter the NEXTVAL from a sequence. I already have a trigger that does this, and I'd like the trigger not to fire if I am passing the NEXTVAL to the table from the procedure. My trigger i…
  3. Whats wrong with my trigger.
    I am trying to create a trigger to update existing information in a table. Take a look at my attached file and code. I believe its something wrong with the trigger statement.
  4. after update trigger design
    Hello! I am implementing a trigger that should do two actions when an update of a fields is performed on Table A from value 2 to 1. 1) Delete the record with same key combination in Table B 2) Clear the timestamp field of that row in Table A. Here's what I coded as two sql statements first delete and then update, is this trigger ok otherwis…
  5. Record count on Database Block
    Hi all, I have 2 canvas (1 canvas having database block items ,2nd having control block items & FIND button also in Control block), My requirement is when i select any one of the lov and click on the find button(in 2nd canvas , control block canvas) then it navigates to the database block canvas and displays records, at that time i want to …


Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
row statement vs after
Participating Experts
Solution Grade



Posted on 2001-05-29 at 19:35:19ID: 28369455

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: sbishop

Posted on 2001-05-29 at 21:22:30ID: 28369456

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: hemlatha_rk

Posted on 2001-05-29 at 22:02:07ID: 28369457

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts


slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv


A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber


What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv


    0 points yesterday


BrowseBecome an Expert