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;


Answer: A

Business

You might also like to view...

If a member of the upper class wore shredded Levi's jeans to a formal party, the person would be exhibiting a sophisticated form of conspicuous consumption known as ________

A) parody display B) invidious distinction C) downsizing D) status anxiety

Business

The ____________ has the authority to enforce the whistle-blower section of the Sarbanes- Oxley Act.

a. Federal Trade Commission b. Occupational Safety and Health Administration c. Federal Communications Commission d. Securities Exchange Commission

Business

In the American Marketing Association's Statement of Ethics, which ethical value stresses a firm's attempts to balance the needs of its buyers with the interests of sellers?

A. honesty B. responsibility C. fairness D. openness E. citizenship

Business

When two or more organizations combine to become one, it is referred to as a(n) _____.

A. joint venture B. flexible structure C. mechanistic structure D. merger E. inorganic venture

Business