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.
Incorrect answer:
Ano such dear customer column
Binvalid syntax
Cinvalid syntax
Einvalid syntax
Finvalid syntax
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 1-18
is there any differece between D and F?
shit i got it;
Jason, the difference is double “” and ” coat.
I DIDNT FIND ANY DIFFERENCE BETWEEN d AND f.
In option F, there is one extra concatenation operator (||) in the end just before the FROM clause. 😉