projektSBDnowy.txt
dbms_output.put_line (w_name ||'' || w_sumame || 'sold a ' || w_row.name || 'for 1 || w_row.price)
end; ---
else
begin
dbms_output.put_line (w_name || ’' || w_sumame || 'gave away a' || w_row.name );
end; end if;
fetch w_cursor into w_row;
end loop; dose w_cursor;
end;
—this procedurę shows all parts in stock for parbcular car model
create or replace procedurę part_in_stock(p_model varchar2) is cursor p_cursor is select part_name, price, in_stock from parts
where id_type=(select id_type from types where model=p_model); partsjist p_cursor%rowtype;
begin
open p_cursor;
fetch p_cursor into partsjist;
dbms_output.putJine('Available parts for '||p_model); while p_cursor%found
loop
dbms_output.putJine(partsJisLpart_name|r '||partsJist.priceH' '||partsJist.in_stock); fetch p_cursor into partsjist;
end loop; dose p_cursor;
end;
Strona 4