DECLARE

DECLARE - vendor_master.vencode%type index by...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Q 10.) DECLARE type rec is record( ename emp.ename%type , sal emp.sal%type); TYPE table_type IS TABLE OF rec index by binary_integer; empv table_type; i binary_integer:=0; begin for rec in(select ename,sal from emp) loop i:=i+1; empv (i).ename :=rec.ename; empv (i).sal :=rec.sal; dbms_output.put_line('Ename:' || empv(i).ename || ' Salary:' || empv(i).sal ); end loop; end; / Q11 DECLARE TYPE table_type IS TABLE OF
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: vendor_master.vencode%type index by binary_integer; vendor table_type; i binary_integer:=0; vendor_rec vendor_master.vencode%type ; begin insert into vendor_master values (&vendor_code); for vendor_rec in(select vencode from vendor_master) loop i:=i+1; vendor(i):= vendor_rec.vencode; dbms_output.put_line('VenCode:' || vendor (i)); end loop; end; /...
View Full Document

Ask a homework question - tutors are online