Home » SQL & PL/SQL » SQL & PL/SQL » create trigger on Sequence
create trigger on Sequence [message #260921] Tue, 21 August 2007 04:56 Go to next message
Rafeek
Messages: 159
Registered: April 2007
Location: egypt
Senior Member
hi all
i create Sequence by maxVal and minVal
how create trigger on Sequence fire when Sequence
reach to maxVal?
thax
Rafeek
Re: create trigger on Sequence [message #260925 is a reply to message #260921] Tue, 21 August 2007 04:57 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
You don't. What are you trying to accomplish?

MHE
Re: create trigger on Sequence [message #260926 is a reply to message #260925] Tue, 21 August 2007 05:00 Go to previous messageGo to next message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

Why you need trigger for that.
Just alter the sequence to cyclic.
ALTER SEQUENCE

Cheers
Sanka
Re: create trigger on Sequence [message #260929 is a reply to message #260921] Tue, 21 August 2007 05:04 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no trigger on sequence.
You can create a trigger "on servererror" and check if error is like:
select s.nextval from dual
*
ERROR at line 1:
ORA-08004: sequence S.NEXTVAL exceeds MAXVALUE and cannot be instantiated

Regards
Michel
Previous Topic: Retriving OS User Name using Job ID
Next Topic: cascade
Goto Forum:
  


Current Time: Thu Dec 08 08:26:28 CST 2016

Total time taken to generate the page: 0.21994 seconds