nerdexam
Oracle

1Z0-074 · Question #76

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

(27 responses)
  • A
    7% (2)
  • B
    15% (4)
  • C
    4% (1)
  • D
    74% (20)

Community Discussion

No community discussion yet for this question.

Full 1Z0-074 Practice