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.