Coin163

首页 > 100.View the Exhibit and examine the structure of the PROMOTIONS table.

100.View the Exhibit and examine the structure of the PROMOTIONS table.

相关标签: 1z0-051 structure

2020腾讯云10周年活动,优惠非常大!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1040

2020阿里云最低价产品入口,含代金券(新老用户有优惠),
入口地址https://www.aliyun.com/minisite/goods

相关推荐:159.View the Exhibit and examine the structure of the CUSTOMERS table.

159.View the Exhibit and examine the structure of the CUSTOMERS table. NEW_CUSTOMERS is a new table with the columns CUST_ID, CUST_NAME and CUST_CITY that have the same data types and size as the corresponding columns in the CUSTOMERS table

100.View the Exhibit and examine the structure of the PROMOTIONS table. Which SQL statements are valid? (Choose all that apply.) A.SELECT promo_id, DECODE(NVL(promo_cost,0), promo_cost, promo_cost * 0.25, 100) "Discount" FROM promotions; B.SELECT promo_id, DECODE(promo_cost, 10000, DECODE(promo_category, 'G1', promo_cost *.25, NULL),NULL) "Catcost" FROM promotions; C.SELECT promo_id, DECODE(NULLIF(promo_cost, 10000), NULL, promo_cost*.25, 'N/A') "Catc

相关推荐:132.View the Exhibit and examine the structure of the SALES and PRODUCTS tables.

132.View the Exhibit and examine the structure of the SALES and PRODUCTS tables. In the SALES table, PROD_ID is the foreign key referencing PROD_ID in the PRODUCTS table, You want to list each product ID and the number of times it has been

ost" FROM promotions; D.SELECT promo_id, DECODE(promo_cost, >10000, 'High',<10000, 'Low') "Range" FROM promotions; 答案:AB 解析: decode(expr,search,result[,search,result,...,default]),比较expr和search,如果匹配返回result,如果都不匹配返回default 如果没有default那么返回null,oracle会将expr和匹配到的search,或者default自动转换为第一个result的类型,如果第一个result为char类型, 那么返回varchar2类型 A:正确 B:正确 C:错误,如果NULLIF(promo_cost, 10000)返回不是null,那么最后结果应该是'N/A',他应该转换为第一个result,也就是promo_cost*.25,转换失败 D:错误,decode 里面 >100这个错误

原文

100.View the Exhibit and examine the structure of the PROMOTIONS table. Which SQL statements are valid (Choose all that apply.) A.SELECT promo_id, DECODE(NVL(promo_cost,0), promo_

------分隔线----------------------------