**1. Create a procedure called InsertProduct that takes in all the details for a Product and inserts it into the Product Table. What i attempted:
CREATE OR REPLACE PROCEDURE InsertProduct
(a IN varchar2,b IN varchar2,c IN int,d IN real) as
BEGIN
INSERT INTO Product
(ID,Name,Quantity,UnitPrice)
VALUES
(a,b,c,d);
END;
Create a Trigger called InsertProduct_Trigger that displays “A Product has been added!” after a product has been added to the Product table.
CREATE OR REPLACE TRIGGER InsertProduct_Trigger AFTER INSERT ON Product ENABLE BEGIN dbms_output.put_line('A Product has been added!'); END;
Create a function called FindUnitPrice that takes in the name of an item and returns its unit price. Use the function to print the unit price of Bread.
CREATE OR REPLACE FUNCTION FindUnitPrice
(a IN varchar2)
RETURN REAL
AS
PRICE REAL;
BEGIN
SELECT UnitPrice INTO PRICE FROM Product WHERE ID = a;
RETURN PRICE;
END;