Tuesday 3 May 2016

EXAMPLE OF SEQUENTIAL CONTROL GOTO.....

declare
--takes the default datatype of the column of the table price
cost price.minprice%type;
begin
select stdprice into cost from price where prodial in (Select prodid from product where prodese = "shampoo");
if cost > 7000 then
goto Upd;
end if;
<< Upd >>
Update price set minprice = 6999 where prodid=111;
end;

No comments:

Post a Comment