nerdexam
Oracle

1Z0-061 · Question #240

The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL CUSTOMER_ADDRESS VARCHAR2(150) CUSTOMER_PHONE VARCHAR2(20) You need to produce output that…

The correct answer is D. SELECT 'Dear Customer ' || customer_name || ', ' FROM customers. Concatenation operator to create a resultant column that is a character expression.

Retrieving Data using the SQL SELECT Statement

Question

The CUSTOMERS table has these columns:

CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL CUSTOMER_ADDRESS VARCHAR2(150) CUSTOMER_PHONE VARCHAR2(20) You need to produce output that states "Dear Customer customer_name, ". The customer_name data values come from the CUSTOMER_NAME column in the CUSTOMERS table. Which statement produces this output?

Options

  • ASELECT dear customer, customer_name, FROM customers;
  • BSELECT "Dear Customer", customer_name || ', ' FROM customers;
  • CSELECT 'Dear Customer ' || customer_name ', ' FROM customers;
  • DSELECT 'Dear Customer ' || customer_name || ', ' FROM customers;
  • ESELECT "Dear Customer " || customer_name || ", " FROM customers;
  • FSELECT 'Dear Customer ' || customer_name || ', ' || FROM customers;

How the community answered

(22 responses)
  • B
    14% (3)
  • C
    5% (1)
  • D
    73% (16)
  • E
    5% (1)
  • F
    5% (1)

Explanation

Concatenation operator to create a resultant column that is a character expression.

Topics

#string concatenation#literals#SELECT statement#column aliases

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice