nerdexam
Oracle

1Z0-071 · Question #354

The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2. The table has two rows whose CUST_LAST_NAME values are Anderson and Ausson. Which query produces output for CUST_LAST_NAME…

The correct answer is D. SELECT REPLACE (REPLACE(cust_last_name, `son', `'), `An', `O') FROM customers. See the full explanation below for the reasoning.

Question

The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2. The table has two rows whose CUST_LAST_NAME values are Anderson and Ausson. Which query produces output for CUST_LAST_NAME containing Oder for the first row and Aus for the second?

Options

  • ASELECT REPLACE (TRIM(TRAILING son' FROM cust_last_name), An', `O') FROM customers;
  • BSELECT INITCAP (REPLACE(TRIM(son' FROM cust_last_name), An', `O')) FROM customers;
  • CSELECT REPLACE (SUBSTR(cust_last_name, -3), An', O') FROM customers;
  • DSELECT REPLACE (REPLACE(cust_last_name, son', '), An', O') FROM customers;

How the community answered

(48 responses)
  • A
    6% (3)
  • B
    4% (2)
  • C
    15% (7)
  • D
    75% (36)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice