SQL> cl scr SQL> declare 2 i number:=1; 3 begin 4 loop 5 exit when i>10; 6 dbms_output.put_line(i); 7 i=i+1; 8 end loop; 9 end; 10 / i=i+1; * ERROR at line 7: ORA-06550: line 7, column 2: PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ; ORA-06550: line 8, column 1: PLS-00103: Encountered the symbol "END" SQL> declare 2 i number:=1; 3 begin 4 loop 5 exit when i>10; 6 dbms_output.put_line(i); 7 i:=i+1; 8 end loop; 9 end; 10 / 1 2 3 4 5 6 7 8 9 10 PL/SQL procedure successfully completed. SQL> declare 2 i number:=1; 3 begin 4 while i>10 5 loop 6 dbms_output.put_line(i); 7 i:=i+1; 8 end loop; 9 end; 10 / PL/SQL procedure successfully completed. SQL> declare 2 i number:=1; 3 begin 4 loop 5 exit when i<=10; 6 loop 7 dbms_output.put_line(i); 8 i:=i+1; 9 end loop; 10 end; 11 / end; * ERROR at line 10: ORA-06550: line 10, column 4: PLS-00103: Encountered the symbol ";" when expecting one of the following: loop SQL> declare 2 i number:=1; 3 begin 4 while i>10 5 loop 6 dbms_output.put_line(i); 7 i:=i+1;/ 8 / i:=i+1;/ * ERROR at line 7: ORA-06550: line 7, column 8: PLS-00103: Encountered the symbol "/" when expecting one of the following: begin case declare end exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe SQL> declare 2 i number:=1; 3 begin 4 while i<=10 5 loop 6 dbms_output.put_line(i); 7 i:=i+1; 8 end loop; 9 end; 10 / 1 2 3 4 5 6 7 8 9 10 PL/SQL procedure successfully completed. SQL> declare 2 i number; 3 for i in 1..10 loop 4 dbms_output.put_line(i); 5 end loop; 6 end; 7 / for i in 1..10 loop * ERROR at line 3: ORA-06550: line 3, column 1: PLS-00103: Encountered the symbol "FOR" when expecting one of the following: begin function package pragma procedure subtype type use form current cursor The symbol "begin" was substituted for "FOR" to continue. SQL> declare 2 i number; 3 begin 4 for i in 1..10 loop 5 dbms_output.put_line(i); 6 end loop; 7 end; 8 / 1 2 3 4 5 6 7 8 9 10 PL/SQL procedure successfully completed. SQL> declare 2 i number; 3 begin 4 for i in reverse 1..10 loop 5 dbms_output.put_line(i); 6 end loop; 7 end; 8 / 10 9 8 7 6 5 4 3 2 1 PL/SQL procedure successfully completed. SQL> declare \ 2 / declare \ * ERROR at line 1: ORA-06550: line 1, column 9: PLS-00103: Encountered the symbol "\" when expecting one of the following: begin function package pragma procedure subtype type use form current cursor SQL> declare 2 i number; 3 begin 4 for i in 1..50 loop 5 mod(i,2)=0 then 6 / mod(i,2)=0 then * ERROR at line 5: ORA-06550: line 5, column 9: PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( % ; SQL> declare 2 i number; 3 begin 4 for i in 1..50 loop 5 if mod(i,2)=0 then 6 dbms_output.put_line(i); 7 end if; 8 end loop; 9 end; 10 / 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 PL/SQL procedure successfully completed. SQL> spool off;