PROGRAM TO DISPLAY THE PRODUCT OF TWO NUMBERS USING STORED PROCEDURE IN ORACLE?



SQL> CREATE OR REPLACE PROCEDURE PRODUCT(A
   NUMBER, B NUMBER) AS
  2 C NUMBER;
  3 BEGIN
  4 C:=A*B;
  5 DBMS_OUTPUT.PUT_LINE('THE PRODUCT OF TWO
  NUMBERS IS'||C);
  6 END PRODUCT;
  7 /

Procedure created.

SQL> EXEC PRODUCT (5,10);
THE PRODUCT OF TWO NUMBERS IS 50

PL/SQL procedure successfully completed.

SQL> @ MULTIPLY.SQL;
Procedure created.

SQL> EXEC PRODUCT (4,9);
THE PRODUCT OF TWO NUMBERS IS 36

PL/SQL procedure successfully completed.

SQL> EXEC PRODUCT (2,5);
THE PRODUCT OF TWO NUMBERS IS 10

PL/SQL procedure successfully completed.

Comments

Popular posts from this blog

Write a program to add two number using inline function in C++?

Traversing of elements program with algorithm and Flowchart