how do i loop through the value of a field in a table column?

If I understood you correctly, that would be something like this:

SQL> declare
  2    l_naprav_name naprav.naprav_name%type;
  3  begin
  4    for cur_r in (select naprav_id from naprav) loop
  5      select naprav_name
  6        into l_naprav_name
  7        from naprav
  8        where naprav_id = cur_r.naprav_id;
  9
 10      dbms_output.put_line(l_naprav_name);
 11    end loop;
 12  end;
 13  /
CLARK
KING
MILLER

PL/SQL procedure successfully completed.

SQL>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top