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

Home -> Community -> Usenet -> c.d.o.misc -> Re: reset a sequence in a trigger

Re: reset a sequence in a trigger

From: Werner Hofmann <superomega_at_t-online.de>
Date: Thu, 19 May 2005 16:57:05 +0200
Message-ID: <d6i9g2$n20$01$1@news.t-online.com>

> 1) Lookup usage for pragma autonomous_transaction at
> http://tahiti.oracle.com
> 2) What's the point of using a sequence when you are going to reset it
> everytime you insert/delete a row?
>
> Regards
> /Rauf

Hallo Rauf,

I don't reset the sequence every time the trigger is called, but I have some code, which is automatically cleaning the content of the table. And in the case the cleaner has deleted all rows, then I wanted to reset the trigger.

In the firebird database I can reset the Generator(sequence) - no problem, but oracle won't like my idea. So, if 1) is not my solution, in last consequence I habe to reset the sequence outside the trigger anywhere in the code.

Thank you,
Werner Received on Thu May 19 2005 - 09:57:05 CDT

Original text of this message

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