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!

accessing a sequence which does not exists

udnappJun 22 2013 — edited Jun 23 2013

i have pl/sql code as below and the sequence  value is displayed based on condition.In case the sequence  does not exists and condition fails  the pl/sql is not getting compiled and throws error  saying that  sequence does not exists.

For eg:

declare

i number;

begin

if ( 1=2)  then

select  top_seq.nextval into i from dual;

dbms_output.put_line('i'||i);

end if;

end;

in above sequence  does not exist and condition is failed as it never access sequence, does the pl/sql  code execute successfully and  which is not  happening as it throws error  . sequence does not exists.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2013
Added on Jun 22 2013
4 comments
1,217 views