设为首页 加入收藏

TOP

ocp 1Z0-051 1-22题解析(四)
2014-11-23 22:31:36 来源: 作者: 【 】 浏览:14
Tags:ocp 1Z0-051 1-22 解析
columns that have different names but compatible data

types.

D. The WHERE clause canbe used to apply additional conditions in SELECT statements containing the

ON or the USING clause.

Answer: CD

解析:

引用官方文档中的说明:

ON condition Use the ON clause to specify a joincondition. Doing so lets you specify

join conditions separatefrom any search or filter conditions in the WHERE clause.

USING (column) When you are specifying an equijoin ofcolumns that have the same

name in both tables, theUSING column clause indicates the columns to be used. You

can use this clause onlyif the join columns in both tables have the same name. Within

this clause, do notqualify the column name with a table name or table alias.

8. View the Exhibit andexamine the structure of the CUSTOMERS table.

Which two tasks wouldrequire subqueries or joins to be executed in a single statement (Choose two.)

\

A. listing of customerswho do not have a credit limit and were born before 1980

B. finding the number ofcustomers, in each city, whose marital status is 'married'

C. finding the averagecredit limit of male customers residing in 'Tokyo' or 'Sydney'

D. listing of thosecustomers whose credit limit is the same as the credit limit of customersresiding in the

city 'Tokyo'

E. finding the number ofcustomers, in each city, whose credit limit is more than the average creditlimit of

all the customers

Answer: DE

解析:

该题的意思是哪些选项需要用子查询或者join连接,很容易看出。

9. Which statement istrue regarding the INTERSECT operator

A. It ignores NULLvalues.

B. Reversing the orderof the intersected tables alters the result.

C. The names of columnsin all SELECT statements must be identical.

D. The number of columnsand data types must be identical for all SELECT statements in the query.

Answer: D

解析:通过insert规则很容易得到D选项

10. View the Exhibit; examine the structure of the PROMOTIONS table.

Each promotion has a durationof at least seven days .

Your manager has askedyou to generate a report, which provides the weekly cost for each promotion

done to l date.

Which query wouldachieve the required result

\

A. SELECT promo_name,promo_cost/promo_end_date-promo_begin_date/7

FROM promotions;

B. SELECTpromo_name,(promo_cost/promo_end_date-promo_begin_date)/7

FROM promotions;

C. SELECT promo_name,promo_cost/(promo_end_date-promo_begin_date/7)

FROM promotions;

D. SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7)

FROM promotions;

Answer: D

解析:这个题就是涉及到优先级的问题,括号里面的优先执行

结束日期减去开始日期除以7得到星期数,再用总值除以星期数就是每个星期的

11. View the Exhibit andexamine the structure of the PRODUCTS table.

All products have a listprice.

You issue the followingcommand to display the total price of each product after a discount of 25% anda

tax of 15% are appliedon it. Freight charges of $100 have to be applied to all the products.

SQL>SELECT prod_name,prod_list_price -(prod_list_price*(25/100))

+(prod_list_price-(prod_list_price*(25/100))*(15/100))+100

AS "TOTALPRICE"

FROM products;

What would be theoutcome if all the parenthese s are removed from the above statement

\

A. It produces a syntaxerror.

B. The result remainsunchanged.

C. The total price valuewould be lower than the correct value.

D. The total price valuewould be higher than the correct value.

Answer: B

解析:题目的意思是去掉括号会输出什么,去掉括号应该是毫无影响的,因为所有加括号的地方都是乘法或者除法运算,他们谁优先不会影响到结果

12. You need to producea report where each customer's credit limit has been incremented by $1000. In

the output, t hecustomer's last

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 4/8/8
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇pg_cancel_backend() 与pg_termin.. 下一篇MongoDB 复制集 (三) 内部数据同步

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: