OCP-1Z0-051 第十二題

原題:

You need to produce a report where each customers credit limit has been incremented by $1000.In the output,the customers last name should have the heading Name and the incremented credit limit should be labeled New Credit Limit.The column headings should have only the first letter of each word in uppercase.

Which statement would accomplish this requirement?

A.SELECT cust_last_name Name,cust_credit_limit +1000 "New Credit limit" FROM customers;

B.SELECT cust_last_name AS Name,cust_credit_limit + 1000 AS New Credit Limit FROM customers;

C.SELECT cust_last_name AS "Name", cust_credit_limit + 1000 AS "New Credit Limit" FROM customers;

D.SELECT INITCAP(cust_last_name) "Name", cust_credit_limit + 1000 INITCAP ("NEW CREDIT LIMIT") FROM customers;

ANSWER: C

翻譯:

你需要一個報表,該報表顯示每個客戶的信貸限額提高$1000之後的結果。客戶的last name列標題應顯示為Name,並且增加的信貸限額列標題應顯示為New Credit Limit,列標題應該每個單詞首字母大寫顯示。

哪條命令能夠實現這樣的需求

解析:

A.選項不正確,Name需要添加雙引號,否則會顯示為name

B.選項不正確,Name需要添加雙引號,否則會顯示為name;後面的New Credit Limit 因為中間有空格,不加雙引號會報錯

C.選項正確

D.選項不正確,別名不能用INITCAP("NEW CREDIT LIMIT")

推薦閱讀:

TAG:ocp認證 | Oracle資料庫 | 資料庫管理員DBA |