Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . A new part - time programming employee has been reviewing some PL / SQL code you devel - oped. The following two blocks
A new parttime programming employee has been reviewing some PLSQL code you devel
oped. The following two blocks contain a variety of exception handlers. Explain the different
types for the new employee.
Block :
DECLARE
exprodupdate EXCEPTION;
BEGIN
UPDATE bbproduct
SET description 'Mill grinder with grind settings!
WHERE idProduct ;
IF SQLNOTFOUND THEN
RAISE exprodupdate;
END IF;
EXCEPTION
WHEN exprodupdate THEN
DBMSOUTPUT.PUTLINEInvalid product ID entered';
END;
Block :
DECLARE
TYPE typebasket IS RECORD
basket bbbasket.idBasketTYPE,
created bbbasket.dtcreatedTYPE,
qty bbbasket.quantityTYPE,
sub bbbasket.subtotalTYPE;
recbasket typebasket;
lvdaysnum NUMBER;
lvshoppernum NUMBER :;
BEGIN
SELECT idBasket, dtcreated, quantity, subtotal
INTO recbasket
FROM bbbasket
WHERE idShopper lvshoppernum
AND orderplaced ;
lvdaysnum : SYSDATE recbasket.created;
EXCEPTION
WHEN NODATAFOUND THEN
DBMSOUTPUT.PUTLINEYou have no saved baskets!;
WHEN OTHERS THEN
DBMSOUTPUT.PUTLINEA problem has occurred.;
DBMSOUTPUT.PUTLINETech Support will be notified and
will contact you via email.;
END;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started