Tuesday, June 19, 2018

Using cursor create pl/sql block using data type %TYPE - DBMS (Cursor)

declare
no empmaster.no%type;
name empmaster.name%type;
cursor abc is select No,Name from empmaster where city='Bombay';
begin
open abc;
loop fetch abc into no,name;
exit when abc%notfound;
insert into citylist values(No,Name);
end loop;
close abc;
end;

No comments:

Post a Comment