Solved

Which of the Following Code Fragments Correctly Uses a Record

Question 39

Multiple Choice

Which of the following code fragments correctly uses a record variable to hold the row of data queried for a shopper?


A) DECLARE
Rec_shopper bb_shopper%ROWTYPE;
BEGIN
SELECT*
INTO rec_shopper
FROM bb_shopper
WHERE idshopper = :g_shopper;
DBMS_OUTPUT.PUT_LINE(rec_shopper.lastname) ;
DBMS_OUTPUT.PUT_LINE(rec_shopper.address) ;
DBMS_OUTPUT.PUT_LINE(rec_shopper.email) ;
END;
B) DECLARE
Rec_shopper bb_shopper%ROW;
BEGIN
SELECT*
INTO rec_shopper
FROM bb_shopper
WHERE idshopper = :g_shopper;
DBMS_OUTPUT.PUT_LINE(rec_shopper.lastname) ;
DBMS_OUTPUT.PUT_LINE(rec_shopper.address) ;
DBMS_OUTPUT.PUT_LINE(rec_shopper.email) ;
END;
C) DECLARE
Rec_shopper bb_shopper%TYPE;
BEGIN
SELECT*
INTO rec_shopper
FROM bb_shopper
WHERE idshopper = :g_shopper;
DBMS_OUTPUT.PUT_LINE(rec_shopper.lastname) ;
DBMS_OUTPUT.PUT_LINE(rec_shopper.address) ;
DBMS_OUTPUT.PUT_LINE(rec_shopper.email) ;
END;
D) DECLARE
Rec_shopper bb_shopperROWTYPE;
BEGIN
SELECT*
INTO rec_shopper
FROM bb_shopper;
WHERE idshopper = :g_shopper;
END;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions