Which statement produces this output?

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?

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?

A.
SELECT ‘Dear Customer ‘ || customer_name || ‘,’
FROM customers;

B.
SELECT ‘Dear Customer ‘ || customer_name ‘,’
FROM customers;

C.
SELECT “Dear Customer ” || customer_name || “,”
FROM customers;

D.
SELECT ‘Dear Customer ‘ || customer_name || ‘,’ ||
FROM customers;

E.
SELECT dear customer, customer_name,
FROM customers;

F.
SELECT “Dear Customer”, customer_name || ‘,’
FROM customers;

Explanation:

: Concatenation operator to create a resultant column that is a character expression.
Refer : Introduction to Oracle9i : SQL, Oracle University Study Guide, 1-18



Leave a Reply 1

Your email address will not be published. Required fields are marked *