Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

alter Sequence starting from a value in table.

RedeMay 11 2010 — edited May 11 2010
hi i had a sequence that needs to be altered by avalues that is present in table.
how can i get that
declare
v_empno nimber;
begin
select max(empno) into v_empno from 
emp                                               
                                                       
alter sequence seq_empno
increment bv_empno;  
end;
Warning: compiled but with compilation errors
I created a  Sequence is like this on the table.

CREATE SEQUENCE seq_empno
  START WITH 1
  MAXVALUE 99999999999999999999999
  MINVALUE 1
  NOCYCLE
  CACHE 20
  NOORDER;
Thanks in Advance

Edited by: 482 on May 11, 2010 12:31 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2010
Added on May 11 2010
8 comments
15,126 views