SQL> --nested loop example SQL> set serveroutpout on SP2-0735: unknown SET option beginning "serveroutp..." SQL> set serveroutput on SQL> begin 2 dbms_output.put_line('helloo'); 3 dbms_output.put_line('there!); 4 end; 5 / ERROR: ORA-01756: quoted string not properly terminated SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put_line('helloo'); 3 dbms_output.put_line('there!'); 4* end; SQL> SQL> / helloo there! PL/SQL procedure successfully completed. SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put('helloo'); 3 dbms_output.put_line('there!'); 4* end; SQL> / helloothere! PL/SQL procedure successfully completed. SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put('helloo'); 3 dbms_output.put('there!'); 4* end; SQL> / PL/SQL procedure successfully completed. SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put('helloo'); 3 dbms_output.put_line('there!'); 4* end; 5 / helloothere! PL/SQL procedure successfully completed. SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put('helloo'); 3 dbms_output.put('there!'); 4 dbms_output.new_line; 5* end; SQL> / helloothere! PL/SQL procedure successfully completed. SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put('helloo'); 3 dbms_output.put('there!'); 4 dbms_output.new_line; 5 dbms_output.put_line('************'); 6* end; 7 / helloothere! ************ PL/SQL procedure successfully completed. SQL> ed Wrote file afiedt.buf 1 begin 2 dbms_output.put('helloo'); 3 dbms_output.put('there!'); 4 dbms_output.new_line; 5 dbms_output.put('************'); 6* end; SQL> / helloothere! PL/SQL procedure successfully completed. SQL> --write an anonymous block to print a right angled triangle using * SQL> --each side will have 4 *s SQL> begin 2 for row in 1 ..4 3 loop 4 for col in 1 .. row 5 loop 6 dbms_output.put('*'); 7 end loop; 8 dbms_output.new_line; 9 end loop; 10 end; 11 / * ** *** **** PL/SQL procedure successfully completed. SQL> spool off