ocp 11g考試題庫(kù)詳解:1Z0-051-113題
最新學(xué)訊:近期OCP認(rèn)證正在報(bào)名中,因考試人員較多請(qǐng)盡快報(bào)名獲取最近考試時(shí)間,報(bào)名費(fèi)用請(qǐng)聯(lián)系在線老師,甲骨文官方認(rèn)證,報(bào)名從速!
我要咨詢ocp 11g考試題庫(kù)詳解:1Z0-051-113題,完整題庫(kù)請(qǐng)點(diǎn)擊這里聯(lián)系老師咨詢了解
113. Examine the structure of the ORDERS table:
Name Null Type
ORDER_ID NOT NULL NUMBER(12)
ORDER_DATE NOT NULL TIMESTAMP(6)
CUSTOMER_ID NOT NULL NUMBER(6)
ORDER_STATUS NUMBER(2)
ORDER_TOTAL NUMBER(8,2)
You want to find the total value of all the orders for each year and issue the following command:
SQL>SELECT TO_CHAR(order_date,'rr'), SUM(order_total)
FROM orders
GROUP BY TO_CHAR(order_date,'yyyy');
Which statement is true regarding the outcome?
A. It executes successfully and gives the correct output.
B. It gives an error because the TO_CHAR function is not valid.
C. It executes successfully but does not give the correct output.
D. It gives an error because the data type conversion in the SELECT list does not match the data type conversion in the GROUP BY clause. 格式不一致
Answer: D
試題解析:
報(bào)錯(cuò),因?yàn)镾ELECT列表中的數(shù)據(jù)類型轉(zhuǎn)換與GROUP BY子句中的數(shù)據(jù)類型轉(zhuǎn)換不匹配。
rr和yyyy的格式不一致,改為一致后可以得出數(shù)據(jù)。
- 冉乃綱-老師CUUG金牌講師
- 冉老師 CUUG金牌講師 Oracle及RedHat高級(jí)講師、Unix/Linux 資深專家...[詳細(xì)了解老師]

- 陳衛(wèi)星-老師CUUG金牌講師
- 陳老師 CUUG金牌講師 精通Oracle管理、備份恢復(fù)、性能優(yōu)化 11年Ora...[詳細(xì)了解老師]
