CREATE OR REPLACE PROCEDURE INSERT_BY_FETCH AS
l_num_rows number := 10000;
l_row yc64.test%ROWTYPE;
CURSOR test_cur
is
select Name, addr
from yc64.test
where rownum< 20;
BEGIN
open test_cur;
LOOP
FETCH test_cur INTO l_row;
EXIT WHEN test_cur%NOTFOUND;
DBMS_OUTPUT.put_line(l_row.name );
insert into T_INSERT values l_row;
END LOOP;
CLOSE test_cur;
END INSERT_BY_FETCH;
/********************Using View**************/
No comments:
Post a Comment