最新 oracle 11g OCP 题库Word文件下载.docx
- 文档编号:16340400
- 上传时间:2022-11-23
- 格式:DOCX
- 页数:19
- 大小:279.62KB
最新 oracle 11g OCP 题库Word文件下载.docx
《最新 oracle 11g OCP 题库Word文件下载.docx》由会员分享,可在线阅读,更多相关《最新 oracle 11g OCP 题库Word文件下载.docx(19页珍藏版)》请在冰豆网上搜索。
CSELECTpromo_id,DECODE(NULLIF(promo_cost,10000),NULL,promo_cost*.25,'
N/A'
)"
D.SELECTpromo_id,DECODE(promo_cost,>
10000,'
High'
<
Low'
Range"
A,B
3.
ViewtheExhibitandexaminethestructureofORDERSandCUSTOMERStables.
Thereisonlyonecustomerwiththecust_last_namecolumnhavingvalueRoberts.WhichINSERTstatementshouldbeusedtoaddarowintotheORDERStableforthecustomerwhoseCUSTLASTNAMEisRobertsandCREDITLIMITis600?
A.INSERTINTOordersVALUES(1,'
10-mar-2007'
'
direct'
(SELECTcustomer_id
FROMcustomers
WHEREcustlastname='
Roberts'
AND
credit_limit=600),1000);
B.INSERTINTOorders(order_id,order_date,order_mode,
(SELECTcustomer_id
FROMcustomers
WHEREcustlastname='
AND
credit_limit=600),order_total)
VALUES(1,'
&
&
customer_id,1000);
C.INSERTINTO(SELECTo.order_id,o.order_date,o.order_mode,c.customer_id,o.order_total
FROMorderso,customersc
WHEREo.customer_id=c.customer_id
ANDc.cust_last_name='
ANDc.credit_limit=600|
VALUES(1,'
(SELECTcustomer_id
WHEREcust_last_name='
ANDcredit_limit=600),1000);
D.INSERTINTOorders(order_id,order_date,order_mode,
WHEREcust_last_name='
VALUES(1,'
A
4.
ViewtheExhibitandexaminethestructureoftheCUSTOMERStable.
EvaluatethefollowingSQLstatement
SQL>
SELECTcust_city,COUNT(cust_last_name)
WHEREcust_credit_limit>
1000
GROUPBYcust_city
HAVINGAVG(cust_credit_limit)BETWEEN5000AND6000;
Whichstatementistrueregardingtheoutcomeoftheabovequery?
A.Itexecutessuccessfully
B.ItreturnsanerrorbecausetheBETWEENoperatorcannotbeusedintheHAVINGclause
C.ItreturnsanerrorbecauseWHEREandHAVINGclausescannotbeusedinthesameSELECTstatement
D.ItreturnsanerrorbecauseWHEREandHAVINGclausescannotbeusedtoapplyconditionsonthesamecolumn
5.
ExaminethefollowingtwoSQLstatements:
WhichstatementistrueregardingtheabovetwoSQLstatements?
A.statement1givesanerror,statement2executessuccessfully
B.statement2givesanerror,statement1executessuccessfully
C.statement1andstatement2executesuccessfullyandgivethesameoutput
D.statement1andstatement2executesuccessfullyandgiveadifferentoutput
D
6.
YoucreatedanORDERStablewiththefollowingdescription:
Youinsertedsomerowsinthetable.Aftersometime,youwanttoalterthetablebycreatingthePRIMARYKEYconstraintontheORD_IDcolumn.Whichstatementistrueinthisscenario?
A.Youcannothavetwoconstraintsononecolumn
B.Youcannotaddaprimarykeyconstraintifdataexistsinthecolumn
C.Theprimarykeyconstraintcanbecreatedonlyatthetimeoftablecreation
D.Youcanaddtheprimarykeyconstraintevenifdataexists,providedthattherearenoduplicatevalues
7.
Whendoesatransactioncomplete?
A.whenaDELETEstatementisexecuted
B.whenaROLLBACKcommandisexecuted
C.whenaPL/SQLanonymousblockisexecuted
D.whenadatadefinitionlanguage(DDL)statementisexecuted
E.whenaTRUNCATEstatementisexecutedafterthependingtransaction
B,D,E
8.
YouneedtodisplaythefirstnamesofallcustomersfromtheCUSTOMERStablethatcontainthecharacter'
e'
andhavethecharacter'
a'
inthesecondlastposition
Whichquerywouldgivetherequiredoutput?
A.SELECTcust_first_name
WHEREINSTR(cust_first_name,'
)<
>
0AND
SUBSTR(cust_first_name,-2,l)='
;
B.SELECTcustfirstname
"
SUBSTR(cust_first_name,-2,l)='
C.SELECTcust_first_name
)ISNOTNULLAND
SUBSTR(cust_first_name,l,-2)='
D.SELECTcust_first_name
)<
SUBSTR(cust_first_name,LENGTH(cust_first_name),-2)='
9.
TheORDERStablebelongstotheuserOE.OEhasgrantedtheSELECTprivilegeontheORDERStabletotheuserHR.
WhichstatementwouldcreateasynonymORDsothatHRcanexecutethefollowingquerysuccessfully?
SELECT*FROMord;
A.CREATESYNONYMordFORorders;
ThiscommandisissuedbyOE
B.CREATEPUBLICSYNONYMordFORorders;
C.CREATESYNONYMordFORoe.orders;
Thiscommandisissuedbythedatabaseadministrator
D.CREATEPUBLICSYNONYMordFORoe.orders;
10.
ViewtheExhibitandexaminethestructureofthePRODUCTStable
Youneedtogenerateareportinthefollowingformat:
Whichtwoquerieswouldgivetherequiredoutput?
(Choosetwo.)
A.SELECTprod_name||q"
'
scategoryis'
||prod_categoryCATEGORIES
FROMproducts;
B.SELECTprod_name||q'
['
s]'
categoryis'
C.SELECTprod_name||q'
\'
s\'
categoryis'
||prod_categoryCATEGORIES
D.SELECTprod_name||q'
<
s>
||'
categoryis'
||prod_categoryCATEGORIES
C,D
11.
WhichstatementistrueregardingtheINTERSECToperator?
A.ItignoresNULLvalues
B.Reversingtheorderoftheintersectedtablesalterstheresult
C.ThenamesofcolumnsinallSELECTstatementsmustbeidentical
D.ThenumberofcolumnsanddatatypesmustbeidenticalforallSELECTstatementsinthequery
12.
WhichtwostatementsaretrueregardingtheUSINGandONclausesintablejoins?
A.BothUSINGandONclausescanbeusedforequijoinsandnonequijoins
B.AmaximumofonepairofcolumnscanbejoinedbetweentwotablesusingtheONclause
C.TheONclausecanbeusedtojointablesoncolumnsthathavedifferentnamesbutcompatibledatatypes
D.TheWHEREclausecanbeusedtoapplyadditionalconditionsinSELECTstatementscontainingtheONortheUSINGclause
13.
ExaminethestructureofthePROGRAMStable
WhichtwoSQLstatementswouldexecutesuccessfully?
A.SELECTNVL(ADD_MONTHS(END_DATE,l),SYSDATE)
FROMprograms;
B.SELECTTO_DATE(NVL(SYSDATE-END_DATE,SYSDATE))
C.SELECTNVL(MONTHS_BETWEEN(start_date,end_date),'
Ongoing'
)
D.SELECTNVL(TO_CHAR(MONTHS_BETWEEN(start_date,end_date)),'
A,D
14.
Wherecansubqueriesbeused?
A.fieldnamesintheSELECTstatement
B.theFROMclauseintheSELECTstatement
C.theHAVINGclauseintheSELECTstatement
D.theGROUPBYclauseintheSELECTstatement
E.theWHEREclauseinonlytheSELECTstatement
F.theWHEREclauseinSELECTaswellasallDMLstatements
A,B,C,F
15.
ViewtheExhibitsandexaminethestructuresofthePRODUCTS,SALES,andCUSTOMERStables
Youneedtogenerateareportthatgivesdetailsofthecustomer'
slastname,nameoftheproduct,andthequantitysoldforallcustomersin'
Tokyo'
Whichtwoqueriesgivetherequiredresult?
A.SELECTc.cust_last_name,p.prod_name,s.quantity_sold
FROMsalessJOINproductsp
USING(prod_id)
JOINcustomersc
B.SELECTc.cust_last_name,p.prod_name,s.quantity_sold
FROMproductspJOINsalessJOINcustomersc
ON(p.prod_id=s.prod_id)
ON(s.cust_id=c.cust_id)
WHEREc.cust_city='
C.SELECTc.cust_last_name,p.prod_name,s.quantity_sold
FROMproductspJOINsaless
ON(p.prod_id=s.prod_id)
JOINcustomersc
ANDc.cust_city='
D.SELECTc.cust_id,c.cust_last_name,p.prod_id,p.prod_name,s.quantity_soldFROMproductspJOINsaless
USING(cust_id)
WHEREc.cust_city='
A,C
16.
ViewtheExhibitandevaluatethestructureanddataintheCUST_STATUStable
YouissuethefollowingSQLstatement
SELECTcustno,NVL2(NULLIF(amt_spent,credit_limit),0,1000)"
BONUS"
FROMcust_status;
Whichstatementistrueregardingtheexecutionoftheabovequery?
A.ItproducesanerrorbecausetheAMT_SPENTcolumncontainsanullvalue
B.Itdisplaysabonusof1000forallcustomerswhoseAMT_SPENTislessthanCREDIT_LIMIT
C.Itdisplaysabonusof1000forallcustomerswhoseAMT_SPENTequalsCREDIT_LIMIT,orAMT_SPENTisnull
D.ItproducesanerrorbecausetheTO_NUMBERfunctionmustbeusedtoconverttheresultoftheNULLIFfunctionbeforeitcanbeusedbytheNVL2function
17.
ExaminethestructureanddatainthePRICELISTtable
Youplantogiveadiscountof25%ontheproductpriceandneedtodisplaythediscountamountinthesameformatasthePROD_PRICE.
WhichSQLstatementwouldgivetherequiredresult?
A.SELECTTO_CHAR(prod_price
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 最新 oracle 11g OCP 题库 11
![提示](https://static.bdocx.com/images/bang_tan.gif)