资源描述:
《Oracle_OCP11g考试题库》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、考试题库1.Oracle_OCP11gWhichstatementistrueregardingtheCOALESCEfunction?A.ItcanhaveamaximumoffiveexpressionsinalistB.ItreturnsthehighestNOTNULLvalueinthelistforallrowsC.ItrequiresthatallexpressionsinthelistmustbeofthesamedatatypeD.Itrequiresthatatleastoneoftheexpressionsinthelistmusthav
2、eaNOTNULLvalueAnswer:C2.ViewtheExhibitandexaminethestructureofthePROMOTIONStable.WhichSQLstatementsarevalid?(Chooseallthatapply.)A.SELECTpromo_id,DECODE(NVL(promo_cost,0),promo_cost,promo_cost*0.25,100)"Discount"FROMpromotions;B.SELECTpromo_id,DECODE(promo_cost,10000,DECODE(promo_ca
3、tegory,'G1',promo_cost*.25,NULL),NULL)"Catcost"FROMpromotions;CSELECTpromo_id,DECODE(NULLIF(promo_cost,10000),NULL,promo_cost*.25,'N/A')"Catcost"FROMpromotions;D.SELECTpromo_id,DECODE(promo_cost,>10000,'High',<10000,'Low')"Range"FROMpromotions;Answer:A,B3.59ViewtheExhibitandexaminet
4、hestructureofORDERSandCUSTOMERStables.Thereisonlyonecustomerwiththecust_last_namecolumnhavingvalueRoberts.WhichINSERTstatementshouldbeusedtoaddarowintotheORDERStableforthecustomerwhoseCUSTLASTNAMEisRobertsandCREDITLIMITis600?A.INSERTINTOordersVALUES(1,'10-mar-2007','direct',(SELECTc
5、ustomer_idFROMcustomersWHEREcustlastname='Roberts'ANDcredit_limit=600),1000);B.INSERTINTOorders(order_id,order_date,order_mode,(SELECTcustomer_idFROMcustomersWHEREcustlastname='Roberts'ANDcredit_limit=600),order_total)VALUES(1,'10-mar-2007','direct',&&customer_id,1000);C.INSERTINTO(
6、SELECTo.order_id,o.order_date,o.order_mode,c.customer_id,o.order_totalFROMorderso,customerscWHEREo.customer_id=c.customer_idANDc.cust_last_name='Roberts'ANDc.credit_limit=600
7、VALUES(1,'10-mar-2007','direct',(SELECTcustomer_idFROMcustomersWHEREcust_last_name='Roberts'ANDcredit_limit=
8、600),1000);D.INSERTINTOorders(order_id,order_date,order_mode,(SELECTcustomer_idFROMcustomers59WHEREcust_last_name='Roberts'ANDcredit_limit=600),order_total)VALUES(1,'10-mar-2007','direct',&customer_id,1000);Answer:A4.ViewtheExhibitandexaminethestructureoftheCUSTOMERStable.Evaluateth
9、efollowingSQLstatem