Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: reset a sequence in a trigger
> 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