1. 程式人生 > >OCP-1Z0-051-題目解析-第16題

OCP-1Z0-051-題目解析-第16題

blog ror cau 花括號 pan 使用 data eval from

16. Evaluate the following query:
SQL> SELECT promo_name  q‘{‘s start date was }‘  promo_begin_date                           
AS "Promotion Launches"
FROM promotions;
What would be the outcome of the above query?


A. It produces an error because flower braces have been used.
B. It produces an error because the data types are not matching.
C.

It executes successfully and introduces an ‘s at the end of each promo_name in the output.

D. It executes successfully and displays the literal " {‘s start date was } " for each row in the output.

Answer: C

題目解析:
A:會產生一個錯誤,由於使用的花括號(錯誤,該處的花括號是Q-quote的表達式)
B:會產生一個錯誤。由於數據類型不匹配(錯誤,無關選項)
C:會正確運行。而且在每個promo_name後面加入一個‘s(正確,這是一個Q-quote的表達式)
D: 會正確運行,而且在每行輸出字符串{‘s start date was }(錯誤)


關於這道題的具體解答參照第13題:http://blog.csdn.net/wjx515628/article/details/35278889

OCP-1Z0-051-題目解析-第16題