Which statement produces this output?

The CUSTOMERS table has these columns:
CUSTOMER_ID NUMBER(4) NOT NULLCUSTOMER_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 NULLCUSTOMER_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.
Incorrect answer:
A:
no such dear customer column
B:
invalid syntax
C:
invalid syntax
E:
invalid syntax
F:
invalid syntax
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 1-18



Leave a Reply 0

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