QuestionQ181

VerifiedUsing Single-Row Functions to Customize Output

The CUSTOMERS table contains 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 generate output that states Dear Customer customer_name, .

The customer_name data values come from the CUSTOMER_NAME column in the CUSTOMERS table.

Which statement generates this output?

Explanation

In Oracle SQL, single quotes delimit character-string literals and || concatenates character strings. Concatenating 'Dear Customer ', customer_name, and ', ' produces the required text for each row.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!