Background and Overview
In a previous module, you used the following code to learn about cursors:
DECLARE
v_prod_id NUMBER;
CURSOR get_product is SELECT product_id FROM
PRODUCT WHERE
product_name = 'Rabbit';
BEGIN
OPEN get_product;
FETCH get_product INTO v_prod_id;
INSERT INTO PET_CARE_LOG (product_id, log_datetime,
log_text)
VALUES (v_prod_id,
TO_DATE('12-DEC-99 05:30PM','DD-MON-YY
HH:MIPM'),
'Rabbits eat fresh grass only.');
CLOSE get_product;
COMMIT;
END;
In this exercise, you need to add two exception handlers to this code.