Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> 'alter sequence' in a PL/SQL procedure?! (!@#$%^&*)
I have been trying to have a procedure alter a sequence in a procedure, but to no avail. I receive the following error:
LINE/COL ERROR
-------- ----------------------------------------------------------------- 4/7 PLS-00103: Encountered the symbol "ALTER" when expecting one of the following: begin declare exit for goto if loop mod null pragma raise return select update while <an identifier> <a double-quoted delimited-identifier> etc.
When i try and do the following:
create or replace procedure restart_seq (start_val in number)
as
begin
alter sequence the_seq minvalue start_val cycle; end;
Why will PL/SQL not allow me to alter a sequence? To test it I ran it on the sqlplus command line, and also tried to do a drop and then recreate the sequence, but it barfed on the DROP.
Any suggestions?
Kenn Herman
Assistant Technical Webmaster
Sierra On-Line
attention, but attention ain't the same thing as love."
Alonzo, age 9Received on Mon Jul 14 1997 - 00:00:00 CDT
----------------------------------------------------------------------