| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: ALTER SEQUENCE NEXTVAL
I would rather use the clever trick by Kevin, as seen in Lisa's other
e-mail. Restoring privileges to the re-built sequence won't be an issue
then... One less thing to worry about...
- Kirti
> -----Original Message-----
> From:	Koivu, Lisa [SMTP:lkoivu_at_qode.com]
> Sent:	Thursday, September 07, 2000 2:56 PM
> To:	Multiple recipients of list ORACLE-L
> Subject:	RE: ALTER SEQUENCE NEXTVAL
> 
> Yes, that's what I'm going to have to do.  I was just hoping there was a
> shorter way out than writing dynamic sql.
> Thanks
> 
> 	-----Original Message-----
> 	From: Steve McClure [mailto:steve_at_pactr.com]
> 	Sent: Thursday, September 07, 2000 3:31 PM
> 	To: Multiple recipients of list ORACLE-L
> 	Subject: Re: ALTER SEQUENCE NEXTVAL
> 	
> 	
> 	Lisa,
> 	 
> 	When I have had need to do this I just dropped the sequence and
> recreated it with the 'start with' value I required.
> 	 
> 	Steve McClure
> 
> 		----- Original Message ----- 
> 		From: Koivu, Lisa <mailto:lkoivu_at_qode.com> 
> 		To: Multiple recipients of list ORACLE-L
> <mailto:ORACLE-L_at_fatcity.com> 
> 		Sent: Thursday, September 07, 2000 6:30 AM
> 		Subject: ALTER SEQUENCE NEXTVAL
> 
> 
> 		I thought I saw someone refer to doing this yesterday on the
> list.  I swear I thought it was possible to alter a sequence to reset the
> nextval to a number you choose, ex., set it back to 1. Turns out the
> documentation doesn't state you can, and it errors out.  Am I missing
> something?  I am writing a procedure to drop and recreate the sequence
> instead. 
> 
> 		  1* alter sequence seq_gn_special_offers_id nextval = 1 
> 		SQL> / 
> 		alter sequence seq_gn_special_offers_id nextval = 1 
> 		                                        * 
> 		ERROR at line 1: 
> 		ORA-02286: no options specified for ALTER SEQUENCE 
> 
> 		SQL> alter sequence seq_gn_special_offers_id set nextval =
> 1; 
> 		alter sequence seq_gn_special_offers_id set nextval = 1 
> 		                                        * 
> 		ERROR at line 1: 
> 		ORA-02286: no options specified for ALTER SEQUENCE 
> 
> 		Lisa Rutland Koivu 
> 		Oracle Database Administrator (do I dare call myself that??)
> 
> 		Qode.com 
> 		4850 North State Road 7 
> 		Suite G104 
> 		Fort Lauderdale, FL  33319 
> 
> 		V: 954.484.3191, x174 
> 		F: 954.484.2933 
> 		C: 954.658.5849 
> 		<http://www.qode.com> 
> 
> 		"The information contained herein does not express the
> opinion or position of Qode.com and cannot be attributed to or made
Received on Thu Sep 07 2000 - 14:14:43 CDT
![]()  | 
![]()  |