1. 程式人生 > >OCP-1Z0-051 第16題 Q操作符的用法

OCP-1Z0-051 第16題 Q操作符的用法

一、原題
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

答案:C
二、題目翻譯
下面的查詢語句:
SQL> SELECT promo_name  q'{'s start date was }'  promo_begin_date
            AS "Promotion Launches"

     FROM promotions;
上面的查詢語句輸出什麼內容?
A. 它產生一個錯誤,因為花括號被使用。
B. 它產生一個錯誤,因為資料型別不匹配。
C. 它會執行成功,並且每一個promo_name後面會輸出一個’s.
D. 它會執行成功,並且每一行會顯示" {'s start date was } "。