I was doing code review and found in procedure one of the block was ended using "END LOOP" instead of "END" . My first impression was procedure should fail during compilation but I was wrong, then thought it should fail while executing but again I was wrong. Can some one help me to understand how ORACLE skips "END LOOP" and compiles or execute without any error.
Example -
begin
begin
for i in 1..5
loop
dbms_output.put_line(i);
end loop;
end loop;
end;
Output -
1
2
3
4
5