AddThis Social Bookmark Button

Select Record of emp table with Cursor

DECLARE
   CURSOR c_emp IS
      SELECT *
        FROM Scott.emp
       WHERE sal< 5000;
BEGIN
   FOR i IN c_emp
   LOOP
      dbms_output.put_line(i.sal);
insert into e1 values (i.sal);
   END LOOP;
END;