PL/SQL Substitution Variables 2

set serveroutput on
declare
  v_num number:=&sv_num;
  v_result number;
begin
  v_result:= power(v_num, 2);
  dbms_output.put_line('The value of v_result is: '||v_result);
end;


declare
  v_radius number:=&v_radius;
  v_area number;
begin
  v_area:= power(v_radius,2)*3.14;
  dbms_output.put_line('The area of the circle is '||v_area);
end;


declare
  v_kenar1 number:=&v_kenar1;
  v_kenar2 number:=&v_kenar2;
  v_cevre number;
  v_alan number;
begin
  v_cevre:=v_kenar1+v_kenar2;
  v_alan:=v_kenar1*v_kenar2;
  dbms_output.put_line('Cevre: '||v_cevre||' Alan: '||v_alan);
end;

Comments

Popular posts from this blog

Solution for "Can not obtain Oracle client information from registry"

Solution for the fault: "System.Diagnostics.Process.Start is not working on IIS, but working on ASP.NET Development Server"