declare x integer:=0; begin for a in (select a from te) loop x:=length(a.a); dbms_output.put_line(x); end loop; end; /