Re: How can we cancel ins/upd/del of ALL rows in a stmt if an exception for some rows is raised during stmt?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 27 Nov 1999 08:08:08 -0500
Message-ID: <2rlv3so2p7d3q2lnlnmrjhguq6lrnn9iru_at_4ax.com>


A copy of this was sent to M. Armaghan Saqib <armaghan_at_yahoo.com> (if that email address didn't require changing) On Sat, 27 Nov 1999 02:50:27 GMT, you wrote:

>Hi,
>
>How can we cancel ins/upd/del of ALL rows in a stmt if an exception for
>some rows is raised during stmt execution?
>
>That is, I do not want to ins/upd/del any single row if all intended
>rows are not processed during a stmt.
>
>This is required because I want to do some processing in AFTER-STMT
>trigger which does not get executed in this case.
>
>Even a small hint will be helpful.
>

It already works this way. The statement is Atomic -- it either all happens or none of it does (inclusive of any side effects from a trigger or such). The fireing statement and all of the work done on its behalf are considered to be part of that statement -- they all go or none do.

You need do nothing to achieve this, it already happens.

>thanks in advance and regards,
>
>--
>------------------------------------------------------------------------
>* SQL PlusPlus: Add power to SQL Plus.
>* SQL Link for XL: Integrate Oracle with XL.
>* Oracle CBT with sample GL (Triggers and Forms Source Code included.
>Download FREE ALL

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Sat Nov 27 1999 - 14:08:08 CET

Original text of this message