Printing ASCII table


This is a cute little PLSQL block. It really is for learning the basics of PLSQL programming. Make sure before running it to set SERVEROUTPUT at your SQL prompt

     SET SERVEROUTPUT ON SIZE=999999



The following PLSQL will display ASCII table


declare
   i number;
   j number;
   k number;
begin
   for i in 2..15 loop
     for j in 1..16 loop
       k:=i*16+j;
       dbms_output.put((to_char(k,'000'))||':'||chr(k)||' ');
       if k mod 8 = 0 then
         dbms_output.put_line('');
       end if;
     end loop;
   end loop;
end;
/




Copyright © 2007, All rights reserved by RudnikConsulting Inc