Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Delete trigger
eric.parker_at_virgin.net (Eric Parker) wrote:
>Hi Yann
>
>Have you considered writing a package that is able to remember
the
>data to be deleted (via a before trigger) and then can restore
that
>data afterwards (via an after trigger).
>
>This would allow you to return without an error code and
without the
>data deleted.
>
>eric
>
>On Wed, 12 Jul 2000 15:02:52 +0200, "Yann Cauchard"
><yann.cauchard_at_spcconsultants.com> wrote:
>
>>Hello,
>>
>>I have to avoid deleting lines in a table using a trigger.
>>I started to write a before delete trigger, which returns some
error
>>messages.
>>But i'd like to return no messages, or a custom message.
>>Can someone help ?
>>
>>Thanks in advance.
>>
>>Yann CAUCHARD
>>
Interesting idea, saving data in a before delete trigger and
using an after delete trigger to re-insert it, but since both
these operations would take place in one transaction the space
vacated by the delete in any and all affected indexes could not
be reused by the insert, since no commit has taken place, and
therefore would require the allocation of new storage slots for
the rows. This could have undesirable storage usage
consequences. I am not 100% sure but the block table storage
management probably works much the same way.
Still it is a possible solution as long as the storage effect is acceptable.
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
Received on Sun Jul 16 2000 - 00:00:00 CDT
![]() |
![]() |