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:
Verified
Q20: A disadvantage of using the %TYPE attribute
Q21: The _ markers are used in PL/SQL
Q22: A(n) _ is a variable that can
Q23: Which of the following statements about collections
Q24: A(n) _ is a variable that can
Q26: The associative array attribute EXISTS returns the
Q27: One major advantage of using _ as
Q28: DECLARE TYPE type_basket IS RECORD(
Basket bb_basket.idBasket%TYPE,
Created bb_basket.dtcreated%TYPE,
Total
Q29: tbl_basketitems(5).idproduct := :g_prod; According to the above
Q30: The UPDATE statement is sometimes called a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents