Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Elementary question about triggers

RE: Elementary question about triggers

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Mon, 14 Oct 2002 10:23:30 -0800
Message-ID: <F001.004E83B2.20021014102330@fatcity.com>


Basics:
1. Delete trigger doesn't delete the row, the DELETE command does it. 2. DELETE command invokes the delete trigger (if the trigger conditions are met).

Solution:
1. Revoke delete priv so no deleted can take place. 2. Create a before-delete trigger and raise application error so that user application receives error and transaction will rollback.

Raj



Rajendra Jamadagni MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!

-----Original Message-----
Sent: Monday, October 14, 2002 2:14 PM
To: Multiple recipients of list ORACLE-L

Dear Listers,

I hope you won't mind a question that (I think) looks unfit for this list:

"Can we prevent a delete trigger from deleting a row?"

To make it clear, here's the code for a trigger:

CREATE OR REPLACE TRIGGER temp_trig BEFORE DELETE ON temp_tab FOR EACH ROW

        ???

END; What statement should I write in the PL/SQL block, that will prevent the deletion of the row.

Thanks & regards,
Charu.



Disclaimer

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.



Visit us at http://www.mahindrabt.com

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Charu Joshi
  INET: joshic_at_mahindrabt.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni_at_espn.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Mon Oct 14 2002 - 13:23:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US