You are on page 1of 15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

JustanotherAllinOneTestKingSites

OracleQuestions&AnswersSearch
Searchfor:
Home
Membership
Subscribe

Go Search

CheckPoint
Cisco
CIW
CompTIA
CWNP
ECCouncil
ISC2
Juniper
Linux
Microsoft
Oracle
Sun
VMWare
EMC
Exin
Isilon
PMI
HP
IBM
ISACA
E XAM I NF ORM AT I ON

RSSfeedforthissection
Thiscategorycontains170posts
1Z0047OracleDatabaseSQLExpert.OracleDatabaseSQLExpertExamPreparationMaterialprovidesyoueverythingyouwillneedtotakeaOracle11g,
OracleCertification,SQLCertificationcertificationsexamination.DetailsareresearchedandproducedbyOracleCertificationExpertswhoareconstantlyusing
industryexperiencetoproduceprecise,andlogical.
YouwanttodisplaytheCUSTOMER_ID,PRODUCT_ID,andtotal(UNIT_PRICEmultipliedbyQUANTITY)fortheorderplaced
PostedbyadminonNovember11,2011

3comments

ViewtheExhibitandexaminethedescriptionsofORDER_ITEMSandORDERStables.

YouwanttodisplaytheCUSTOMER_ID,PRODUCT_ID,andtotal(UNIT_PRICEmultipliedbyQUANTITY)fortheorderplaced.Youalsowanttodisplaythe
subtotalsforaCUSTOMER_IDaswellasforaPRODUCT_IDforthelastsixmonths.WhichSQLstatementwouldyouexecutetogetthedesiredoutput?
A.
SELECTo.customer_id,oi.product_id,SUM(oi.unit_price*oi.quantity)TotalFROMorder_itemsoiJOINorderso
ONoi.order_id=o.order_id
GROUPBYROLLUP(o.customer_id,oi.product_id)
WHEREMONTHS_BETWEEN(order_date,SYSDATE)<=6
B.
SELECTo.customer_id,oi.product_id,SUM(oi.unit_price*oi.quantity)TotalFROMorder_itemsoiJOINorderso
ONoi.order_id=o.order_id
GROUPBYROLLUP(o.customer_id,oi.product_id)
HAVINGMONTHS_BETWEEN(order_date,SYSDATE)<=6
C.
SELECTo.customer_id,oi.product_id,SUM(oi.unit_price*oi.quantity)TotalFROMorder_itemsoiJOINorderso
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

1/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

ONoi.order_id=o.order_id
GROUPBYROLLUP(o.customer_id,oi.product_id)
WHEREMONTHS_BETWEEN(order_date,SYSDATE)>=6
D.
SELECTo.customer_id,oi.product_id,SUM(oi.unit_price*oi.quantity)TotalFROMorder_itemsoiJOINorderso
ONoi.order_id=o.order_id
WHEREMONTHS_BETWEEN(order_date,SYSDATE)<=6
GROUPBYROLLUP(o.customer_id,oi.product_id)

Whatisthereasonwhenyouexecutethestatementitdoesnotproducethedesiredoutput?
PostedbyadminonNovember11,2011

2comments

ViewtheExhibitandexaminethedescriptionoftheEMPLOYEEStable.

YouwanttodisplaytheEMPLOYEE_ID,FIRST_NAME,andDEPARTMENT_IDforalltheemployeeswhoworkinthesamedepartmentandhavethesame
managerasthatoftheemployeehavingEMPLOYEE_ID104.Toaccomplishthetask,youexecutethefollowingSQLstatement:
SELECTemployee_id,first_name,department_id
FROMemployees
WHERE(manager_id,department_id)=(SELECTdepartment_id,manager_idFROMemployees
WHEREemployee_id=104)
ANDemployee_id<>104
Whenyouexecutethestatementitdoesnotproducethedesiredoutput.Whatisthereasonforthis?
A.
TheWHEREclauseconditioninthemainqueryisusingthe=comparisonoperator,insteadofEXISTS.
B.
TheWHEREclauseconditioninthemainqueryisusingthe=comparisonoperator,insteadoftheINoperator.
C.
TheWHEREclauseconditioninthemainqueryisusingthe=comparisonoperator,insteadofthe=ANYoperator.
D.
ThecolumnsintheWHEREclauseconditionofthemainqueryandthecolumnsselectedinthesubqueryshouldbeinthesameorder.

hatchangeswouldyoumaketothequerytocalculatetheannualcompensationcorrectly?
PostedbyadminonNovember11,2011

Nocomments

ViewtheExhibitandexaminethedescriptionoftheEMPLOYEEStable.

Yourcompanydecidedtogiveamonthlybonusof$50toalltheemployeeswhohavecompletedfiveyearsinthecompany.Thefollowingstatementiswrittento
displaytheLAST_NAME,DEPARTMENT_ID,andthetotalannualsalary:
SELECTlast_name,department_id,salary+50*12AnnualCompensationFROMemployeesWHEREMONTHS_BETWEEN(SYSDATE,hire_date)/12>=5

http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

2/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

Whenyouexecutethestatement,theAnnualCompensationisnotcomputedcorrectly.Whatchangeswouldyoumaketothequerytocalculatetheannual
compensationcorrectly?
A.
ChangetheSELECTclausetoSELECTlast_name,department_id,salary*12+50AnnualCompensation.
B.
ChangetheSELECTclausetoSELECTlast_name,department_id,salary+(50*12)AnnualCompensation.
C.
ChangetheSELECTclausetoSELECTlast_name,department_id,(salary+50)*12AnnualCompensation.

D.
ChangetheSELECTclausetoSELECTlast_name,department_id,(salary*12)+50AnnualCompensation.
WhichstatementistrueregardingthePROD_ID_PKconstraint?
PostedbyadminonNovember11,2011

2comments

EvaluatetheCREATETABLEstatement:
CREATETABLEproducts
(product_idNUMBER(6)CONSTRAINTprod_id_pkPRIMARYKEY,product_nameVARCHAR2(15))
WhichstatementistrueregardingthePROD_ID_PKconstraint?
A.
Itwouldbecreatedonlyifauniqueindexismanuallycreatedfirst.
B.
Itwouldbecreatedandwoulduseanautomaticallycreateduniqueindex.

C.
Itwouldbecreatedandwoulduseanautomaticallycreatednouniqueindex.
D.
Itwouldbecreatedandremainsinadisabledstatebecausenoindexisspecifiedinthecommand.

Whichtwostatementsistrueregardingtheabovecommand?
PostedbyadminonNovember11,2011

3comments

ViewtheExhibitandexaminethestructureoftheEMPtablewhichisnotpartitionedandnotanindexorganizedtable.EvaluatethefollowingSQLstatement:
ALTERTABLEemp
DROPCOLUMNfirst_name
Whichtwostatementsistrueregardingtheabovecommand?(Choosetwo.)

A.
TheFIRST_NAMEcolumnwouldbedroppedprovideditdoesnotcontainanydata.
B.
TheFIRST_NAMEcolumnwouldbedroppedprovidedatleastoneormorecolumnsremaininthetable.

C.
TheFIRST_NAMEcolumncanberolledbackprovidedtheSETUNUSEDoptionisaddedtotheaboveSQLstatement.
D.
TheFIRST_NAMEcolumncanbedroppedevenifitispartofacompositePRIMARYKEYprovidedthe
CASCADEoptionisused.

YouwanttoaddaconstraintontheCUST_FIRST_NAMEcolumnoftheCUSTOMERStablesothatthevalueinsertedinthecolumndoesnothave
numbers.
PostedbyadminonNovember11,2011

1comment

ViewtheExhibitandexaminethedescriptionoftheCUSTOMERStable.

http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

3/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

YouwanttoaddaconstraintontheCUST_FIRST_NAMEcolumnoftheCUSTOMERStablesothatthevalueinsertedinthecolumndoesnothavenumbers.Which
SQLstatementwouldyouusetoaccomplishthetask?
A.
ALTERTABLECUSTOMERSADDCONSTRAINTcust_f_name
CHECK(REGEXP_LIKE(cust_first_name,^AZ))NOVALIDATE
B.
ALTERTABLECUSTOMERSADDCONSTRAINTcust_f_name
CHECK(REGEXP_LIKE(cust_first_name,^[09]))NOVALIDATE
C.
ALTERTABLECUSTOMERSADDCONSTRAINTcust_f_name
CHECK(REGEXP_LIKE(cust_first_name,[[:alpha:]]))NOVALIDATE

D.
ALTERTABLECUSTOMERSADDCONSTRAINTcust_f_name
CHECK(REGEXP_LIKE(cust_first_name,[[:digit:]]))NOVALIDATE
Whichtechniqueshouldbeusedtoloadthedatamostefficiently?
PostedbyadminonSeptember9,2011

1comment

YouneedtoloadinformationaboutnewcustomersfromtheNEW_CUSTtableintothetablesCUSTandCUST_SPECIAL.Ifanewcustomerhasacreditlimit
greaterthan10,000,thenthe
detailshavetobeinsertedintoCUST_SPECIAL.AllnewcustomerdetailshavetobeinsertedintotheCUSTtable.Whichtechniqueshouldbeusedtoloadthedata
mostefficiently?
A.
externaltable
B.
theMERGEcommand
C.
themultitableINSERTcommand

D.
INSERTusingWITHCHECKOPTION
WhichstatementistrueregardingtheeffectoftheaboveSQLstatement?
PostedbyadminonSeptember9,2011

Nocomments

ORDisaprivatesynonymfortheOE.ORDERStable.
TheuserOEissuesthefollowingcommand:
DROPSYNONYMord
WhichstatementistrueregardingtheaboveSOLstatement?
A.
Onlythesynonymwouldbedropped.

B.
Thesynonymwouldbedroppedandthecorrespondingtablewouldbecomeinvalid.
C.
Thesynonymwouldbedroppedandthepackagesreferringtothesynonymwouldbedropped.
D.
ThesynonymwouldbedroppedandanyPUBLICsynonymwiththesamenamebecomesinvalid.
WhichstatementwouldcreateasynonymORDsothatHRcanexecutethefollowingquerysuccessfully?
PostedbyadminonSeptember9,2011
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

2comments
4/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

TheORDERStablebelongstotheuserOE.OEhasgrantedtheSELECTprivilegeontheORDERStabletotheuserHR.Whichstatementwouldcreateasynonym
ORDsothatHRcanexecutethefollowingquerysuccessfully?SELECTFROMord
A.
CREATESYNONYMordFORordersThiscommandisissuedbyOE.
B.
CREATEPUBLICSYNONYMordFORordersThiscommandisissuedbyOE.
C.
CREATESYNONYMordFORoe.ordersThiscommandisissuedbythedatabaseadministrator.
D.
CREATEPUBLICSYNONYMordFORoe.ordersThiscommandisissuedbythedatabaseadministrator.

WhichstatementistrueregardingtheeffectoftheaboveSQLstatement?
PostedbyadminonSeptember9,2011

4comments

EvaluatethefollowingSQLstatement:
ALTERTABLEhr.empSETUNUSED(mgr_id)
WhichstatementistrueregardingtheeffectoftheaboveSQLstatement?
A.
AnysynonymexistingontheEMPtablewouldhavetoberecreated.
B.
AnyconstraintsdefinedontheMGR_IDcolumnwouldberemovedbytheabovecommand.

C.
AnyviewscreatedontheEMPtablethatincludetheMGR_IDcolumnwouldhavetobedroppedandrecreated.
D.
AnyindexcreatedontheMGR_IDcolumnwouldcontinuetoexistuntiltheDROPUNUSEDCOLUMNScommandisexecuted.
WhichtwostatementsaretrueregardingthetypesoftablejoinsavailableinOracleDatabase10g?
PostedbyadminonSeptember9,2011

4comments

WhichtwostatementsaretrueregardingthetypesoftablejoinsavailableinOracleDatabase10g?(Choosetwo.)
A.
YoucanusetheJOINclausetojoinonlytwotables.
B.
YoucanexplicitlyprovidethejoinconditionwithaNATURALJOIN.
C.
YoucanusetheUSINGclausetojointablesonmorethanonecolumn.

D.
YoucanusetheONclausetospecifymultipleconditionswhilejoiningtables.

Asubqueryiscalledasinglerowsubquerywhen____.
PostedbyadminonSeptember9,2011

Nocomments

Asubqueryiscalledasinglerowsubquerywhen____.
A.
theinnerqueryreturnsasinglevaluetothemainquery

B.
theinnerqueryusesanaggregatefunctionandreturnsoneormorevalues
C.
thereisonlyoneinnerqueryinthemainqueryandtheinnerqueryreturnsoneormorevalues
D.
theinnerqueryreturnsoneormorevaluesandthemainqueryreturnsasinglevalueasoutput
Whatisthecorrectoutputoftheabovequery?
PostedbyadminonSeptember9,2011

Nocomments

Evaluatethefollowingquery:
SELECTINTERVAL300MONTH,
INTERVAL542YEARTOMONTH,
INTERVAL11:12:10.1234567HOURTOSECOND
FROMdual
Whatisthecorrectoutputoftheabovequery?
A.
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

5/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

+2500,+5402,+0011:12:10.123457

B.
+00300,+5402,+0011:12:10.123457
C.
+2500,+00650,+0011:12:10.123457
D.
+00300,+00650,+0011:12:10.123457
WhichSQLstatementwoulddisplaytheviewnamesanddefinitionsofalltheviewsownedbyyou?
PostedbyadminonSeptember9,2011

1comment

WhichSQLstatementwoulddisplaytheviewnamesanddefinitionsofalltheviewsownedbyyou?
A.
SELECTview_name,text
FROMuser_view
B.
SELECTview_name,text
FROMuser_object
C.
SELECTview_name,text
FROMuser_objects
D.
SELECTview_name,text
FROMuser_views

WhichstatementistrueregardingtheaboveSQLstatement?
PostedbyadminonSeptember9,2011

Nocomments

ORDisaprivatesynonymfortheOE.ORDERStable.TheuserOEissuesthefollowingcommand:
DROPSYNONYMord
WhichstatementistrueregardingtheaboveSQLstatement?
A.
Onlythesynonymwouldbedropped.

B.
Thesynonymwouldbedroppedandthecorrespondingtablewouldbecomeinvalid.
C.
Thesynonymwouldbedroppedandthepackagesreferringtothesynonymwouldbedropped.
D.
ThesynonymwouldbedroppedandanyPUBLICsynonymwiththesamenamebecomesinvalid.
WhichthreepossiblevaluescanbesetfortheTIME_ZONEsessionparameterbyusingtheALTERSESSIONcommand?
PostedbyadminonSeptember9,2011

1comment

WhichthreepossiblevaluescanbesetfortheTIME_ZONEsessionparameterbyusingtheALTERSESSIONcommand?(Choosethree.)
A.
os
B.
local

C.
8:00

D.
dbtimezone

E.
Australia
Whichtwostatementsaretrueregardingsubqueries?
PostedbyadminonSeptember9,2011

http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

1comment

6/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

Whichtwostatementsaretrueregardingsubqueries?(Choosetwo.)
A.
Onlytwosubqueriescanbeplacedatonelevel.
B.
Asubquerycanbeusedtoaccessdatafromoneormoretablesorviews.

C.
Ifthesubqueryreturns0rows,thenthevaluereturnedbythesubqueryexpressionisNULL.

D.
Thecolumnsinasubquerymustalwaysbequalifiedwiththenameoraliasofthetableused.
E.
AsubqueryintheWHEREclauseofaSELECTstatementcanbenesteduptothreelevelsonly.
Whichthreestatementsaretrue?
PostedbyadminonSeptember9,2011

Nocomments

Whichthreestatementsaretrue?(Choosethree.)
A.
OnlyoneLONGcolumncanbeusedpertable.

B.
ATIMESTAMPdatatypecolumnstoresonlytimevalueswithfractionalseconds.
C.
TheBLOBdatatypecolumnisusedtostorebinarydatainanoperatingsystemfile.
D.
Theminimumcolumnwidththatcanbespecifiedforavarchar2datatypecolumnisone.

E.
ThevalueforaCHARdatatypecolumnisblankpaddedtothemaximumdefinedcolumnwidth.

WhichviewwouldyouusetodisplaythecolumnnamesandDEFAULTvaluesforatable?
PostedbyadminonSeptember9,2011

2comments

WhichviewwouldyouusetodisplaythecolumnnamesandDEFAULTvaluesforatable?
A.
DBA_TABLES
B.
DBA_COLUMNS
C.
USER_COLUMNS
D.
USER_TAB_COLUMNS

Whichthreestatementsaretrueregardingsinglerowfunctions?
PostedbyadminonSeptember9,2011

1comment

Whichthreestatementsaretrueregardingsinglerowfunctions?(Choosethree.)
A.
Theycanacceptonlyoneargument.
B.
Theycanbenesteduptoonlytwolevels.
C.
Theycanreturnmultiplevaluesofmorethanonedatatype.
D.
TheycanbeusedinSELECT,WHERE,andORDERBYclauses.

E.
Theycanmodifythedatatypeoftheargumentthatisreferenced.

F.
Theycanacceptacolumnname,expression,variablename,orausersuppliedconstantasarguments.

Whichthreestatementsaretrueregardinggroupfunctions?
PostedbyadminonSeptember9,2011
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

Nocomments
7/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

Whichthreestatementsaretrueregardinggroupfunctions?(Choosethree.)
A.
Theycanbeusedoncolumnsorexpressions.

B.
Theycanbepassedasanargumenttoanothergroupfunction.

C.
TheycanbeusedonlywithaSQLstatementthathastheGROUPBYclause.
D.
TheycanbeusedononlyonecolumnintheSELECTclauseofaSQLstatement.
E.
TheycanbeusedalongwiththesinglerowfunctionintheSELECTclauseofaSQLstatement.

WhichstatementsaretrueregardingtheusageoftheWITHclauseincomplexcorrelatedsubqueries?
PostedbyadminonSeptember9,2011

4comments

WhichstatementsaretrueregardingtheusageoftheWITHclauseincomplexcorrelatedsubqueries?(Chooseallthatapply.)
A.
ItcanbeusedonlywiththeSELECTclause.

B.
TheWITHclausecanholdmorethanonequery.

C.
Ifthequeryblocknameandthetablenamewerethesame,thenthetablenamewouldtakeprecedence.
D.
ThequerynameintheWITHclauseisvisibletootherqueryblocksintheWITHclauseaswellastothemainqueryblock.

WhichthreestatementsaretrueregardingtheWHEREandHAVINGclausesinaSQLstatement?
PostedbyadminonSeptember9,2011

Nocomments

WhichthreestatementsaretrueregardingtheWHEREandHAVINGclausesinaSQLstatement?(Choosethree.)
A.
TheHAVINGclauseconditionscanhaveaggregatefunctions.

B.
TheHAVINGclauseconditionscanusealiasesforthecolumns.
C.
WHEREandHAVINGclausescannotbeusedtogetherinaSQLstatement.
D.
TheWHEREclauseisusedtoexcluderowsbeforethegroupingofdata.

E.
TheHAVINGclauseisusedtoexcludeoneormoreaggregatedresultsaftergroupingdata.

WhichtwostatementsbestdescribethebenefitsofusingtheWITHclause?
PostedbyadminonSeptember9,2011

Nocomments

WhichtwostatementsbestdescribethebenefitsofusingtheWITHclause?(Choosetwo.)
A.
Itenablesuserstostoretheresultsofaquerypermanently.
B.
Itenablesuserstostorethequeryblockpermanentlyinthememoryanduseittocreatecomplexqueries.
C.
ItenablesuserstoreusethesamequeryblockinaSELECTstatement,ifitoccursmorethanonceinacomplexquery.

D.
ItcanimprovetheperformanceofalargequerybystoringtheresultofaqueryblockhavingtheWITHclauseintheuserstemporarytablespace.

Whichtwostatementsaretrueregardingconstraints?
PostedbyadminonSeptember9,2011

Nocomments

Whichtwostatementsaretrueregardingconstraints?(Choosetwo.)
A.
AforeignkeycannotcontainNULLvalues.
B.
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

8/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

AcolumnwiththeUNIQUEconstraintcancontainNULL.

C.
AconstraintisenforcedonlyfortheINSERToperationonatable.
D.
Aconstraintcanbedisabledeveniftheconstraintcolumncontainsdata.

E.
Alltheconstraintscanbedefinedatthecolumnlevelaswellasthetablelevel.
Whichstatementcorrectlydifferentiatesasystemprivilegefromanobjectprivilege?
PostedbyadminonSeptember9,2011

Nocomments

Whichstatementcorrectlydifferentiatesasystemprivilegefromanobjectprivilege?
A.
SystemprivilegescanbegrantedonlybytheDBAwhereasobjectprivilegescanbegrantedbyDBAsortheowneroftheobject.
B.
Systemprivilegesgivetherightstoonlycreateuserschemaswhereasobjectprivilegesgiverightstomanipulateobjectsinaschema.
C.
Usersrequiresystemprivilegestogainaccesstothedatabasewhereastheyrequireobjectprivilegestocreateobjectsinthedatabase.
D.
Asystemprivilegeistherighttoperformspecificactivitiesinadatabasewhereasanobjectprivilegeisarighttoperformactivitiesonaspecificobjectinthedatabase.

Givenbelowisthelistofmetacharactersyntaxesandtheirdescriptionsinrandomorder:
PostedbyadminonSeptember9,2011

Nocomments

Givenbelowisthelistofmetacharactersyntaxesandtheirdescriptionsinrandomorder:
MetacharactersyntaxDescription
1)^a)Matchescharacternotinthelist
2)[^...]b)Matchescharacterwhenitoccursatthebeginningofaline
3)|c)Treatsthesubsequentmetacharacterasaliteral
4)d)MatchesoneofthecharacterssuchastheORoperator
Identifytheoptionthatcorrectlymatchesthemetacharactersyntaxeswiththeirdescriptions.
A.
1b,2a,3d,4c

B.
1a,2b,3d,4c
C.
1d,2b,3a,4c
D.
1b,2c,3d,2a
Whichstatementsaretrue?
PostedbyadminonSeptember9,2011

3comments

Whichstatementsaretrue?(Chooseallthatapply.)
A.
Thedatadictionaryiscreatedandmaintainedbythedatabaseadministrator.
B.
Thedatadictionaryviewscanconsistofjoinsofdictionarybasetablesanduserdefinedtables.
C.
Theusernamesofalltheusersincludingthedatabaseadministratorsarestoredinthedatadictionary.

D.
TheUSER_CONS_COLUMNSviewshouldbequeriedtofindthenamesofthecolumnstowhichaconstraintapplies.

E.
BothUSER_OBJECTSandCATviewsprovidethesameinformationaboutalltheobjectsthatareownedbytheuser.
F.
Viewswiththesamenamebutdifferentprefixes,suchasDBA,ALLandUSER,usethesamebasetablesfromthedatadictionary

Whichstatementistrue?
PostedbyadminonSeptember9,2011

1comment

EvaluatetheSQLstatements:
CREATETABLEnew_order
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

9/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

(ordernoNUMBER(4),
booking_dateTIMESTAMPWITHLOCALTIMEZONE)
ThedatabaseislocatedinSanFranciscowherethetimezoneis8:00.TheuserislocatedinNewYorkwherethetimezoneis5:00.
ANewYorkuserinsertsthefollowingrecord:
INSERTINTOnew_order
VALUES(1,TIMESTAMP?00705106:00:005:00?)
Whichstatementistrue?
A.
WhentheNewYorkuserselectstherow,booking_dateisdisplayedas00705103.00.00.000000
B.
WhentheNewYorkuserselectstherow,booking_dateisdisplayedas200705106.00.00.0000005:00.
C.
WhentheSanFranciscouserselectstherow,booking_dateisdisplayedas00705103.00.00.000000

D.
WhentheSanFranciscouserselectstherow,booking_dateisdisplayedas00705103.00.00.0000008:00
Whichtwostatementsaretrueregardingroles?
PostedbyadminonSeptember8,2011

2comments

Whichtwostatementsaretrueregardingroles?(Choosetwo.)
A.
Arolecanbegrantedtoitself.
B.
ArolecanbegrantedtoPUBLIC.

C.
Ausercanbegrantedonlyoneroleatanypointoftime.
D.
TheREVOKEcommandcanbeusedtoremoveprivilegesbutnotrolesfromotherusers.
E.
Rolesarenamedgroupsofrelatedprivilegesthatcanbegrantedtousersorotherroles.

WhichstatementistrueregardingtheSESSION_PRIVSdictionaryview?
PostedbyadminonSeptember8,2011

3comments

WhichstatementistrueregardingtheSESSION_PRIVSdictionaryview?
A.
Itcontainsthecurrentobjectprivilegesavailableintheusersession.
B.
Itcontainsthecurrentsystemprivilegesavailableintheusersession.

C.
Itcontainstheobjectprivilegesgrantedtootherusersbythecurrentusersession.
D.
Itcontainsthesystemprivilegesgrantedtootherusersbythecurrentusersession.
WhichstatementistrueregardingtheCUBEoperatorintheGROUPBYclauseofaSQLstatement?
PostedbyadminonSeptember8,2011

1comment

WhichstatementistrueregardingtheCUBEoperatorintheGROUPBYclauseofaSQLstatement?
A.
ItproducesonlyaggregatesforthegroupsspecifiedintheGROUPBYclause.
B.
ItfindsalltheNULLvaluesinthesuperaggregatesforthegroupsspecifiedintheGROUPBYclause.
C.
Itproduces2npossiblesuperaggregatecombinations,ifthencolumnsandexpressionsarespecifiedintheGROUPBYclause.

D.
Itproducesn+1possiblesuperaggregatecombinations,ifthencolumnsandexpressionsarespecifiedintheGROUPBYclause.
Whichstatementistrueregardingsynonyms?
PostedbyadminonSeptember8,2011

Nocomments

Whichstatementistrueregardingsynonyms?
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

10/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

A.
Synonymscanbecreatedfortablesbutnotviews.
B.
Synonymsareusedtoreferenceonlythosetablesthatareownedbyanotheruser.
C.
Apublicsynonymandaprivatesynonymcanexistwiththesamenameforthesametable.

D.
TheDROPSYNONYMstatementremovesthesynonym,andthestatusofthetableonwhichthesynonymhasbeencreatedbecomesinvalid.
WhichtwostatementsaretrueregardingtheGROUPBYclauseinaSQLstatement?
PostedbyadminonSeptember8,2011

1comment

WhichtwostatementsaretrueregardingtheGROUPBYclauseinaSQLstatement?(Choosetwo.)
A.
YoucanusecolumnaliasintheGROUPBYclause.
B.
UsingtheWHEREclauseaftertheGROUPBYclauseexcludestherowsaftercreatinggroups.
C.
TheGROUPBYclauseismandatoryifyouareusinganaggregatefunctionintheSELECTclause.
D.
UsingtheWHEREclausebeforetheGROUPBYclauseexcludestherowsbeforecreatinggroups.

E.
IftheSELECTclausehasanaggregatefunction,thenthoseindividualcolumnswithoutanaggregatefunctionintheSELECTclauseshouldbeincludedintheGROUPBYclause.

WhichstatementistrueabouttheDELETEstatement?
PostedbyadminonSeptember8,2011

Nocomments

EvaluatethefollowingDELETEstatement:
DELETEFROMorders
TherearenootheruncommittedtransactionsontheORDERStable.
WhichstatementistrueabouttheDELETEstatement?
A.
ItremovesalltherowsinthetableandallowsROLLBACK.

B.
Itwouldnotremovetherowsifthetablehasaprimarykey.
C.
Itremovesalltherowsaswellasthestructureofthetable.
D.
ItremovesalltherowsinthetableanddoesnotallowROLLBACK.
WhichstatementwouldcreateasynonymORDsothatHRcanexecutethefollowingquerysuccessfully?
PostedbyadminonSeptember8,2011

2comments

TheORDERStablebelongstotheuserOE.OEhasgrantedtheSELECTprivilegeontheORDERStabletotheuserHR.Whichstatementwouldcreateasynonym
ORDsothatHRcanexecutethefollowingquerysuccessfully?
SELECT*FROMord
A.
CREATESYNONYMordFORordersThiscommandisissuedbyOE.
B.
CREATEPUBLICSYNONYMordFORordersThiscommandisissuedbyOE.
C.
CREATESYNONYMordFORoe.ordersThiscommandisissuedbythedatabaseadministrator.
D.
CREATEPUBLICSYNONYMordFORoe.ordersThiscommandisissuedbythedatabaseadministrator.

Whichtwomatcheswouldbereturnedbythisexpression?
PostedbyadminonSeptember8,2011

2comments

Evaluatethefollowingexpressionusingmetacharacterforregularexpression:
[^Ale|ax.r$]
Whichtwomatcheswouldbereturnedbythisexpression?(Choosetwo.)
A.
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

11/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

Alex
B.
Alax
C.
Alxer
D.
Alaxendar

E.
Alexender

WhichmultitableINSERTstatementwouldyouuse?
PostedbyadminonSeptember8,2011

2comments

ThedetailsoftheorderID,orderdate,ordertotal,andcustomerIDareobtainedfromtheORDERStable.Iftheordervalueismorethan30000,thedetailshavetobe
addedtotheLARGE_ORDERStable.TheorderID,orderdate,andordertotalshouldbeaddedtotheORDER_HISTORYtable,andorderIDandcustomer
IDshouldbeaddedtotheCUST_HISTORYtable.WhichmultitableINSERTstatementwouldyouuse?
A.
PivotingINSERT
B.
UnconditionalINSERT
C.
ConditionalALLINSERT

D.
ConditionalFIRSTINSERT
Whichthreestatementsindicatetheendofatransaction?
PostedbyadminonSeptember8,2011

1comment

Whichthreestatementsindicatetheendofatransaction?(Choosethree.)
A.
afteraCOMMITisissued

B.
afteraROLLBACKisissued

C.
afteraSAVEPOINTisissued
D.
afteraSELECTstatementisissued
E.
afteraCREATEstatementisissued

EvaluatethefollowingALTERTABLEstatement:ALTERTABLEordersSETUNUSEDorder_dateWhichstatementistrue?
PostedbyadminonSeptember8,2011

2comments

EvaluatethefollowingALTERTABLEstatement:
ALTERTABLEorders
SETUNUSEDorder_date
Whichstatementistrue?
A.
TheDESCRIBEcommandwouldstilldisplaytheORDER_DATEcolumn.
B.
ROLLBACKcanbeusedtogetbacktheORDER_DATEcolumnintheORDERStable.
C.
TheORDER_DATEcolumnshouldbeemptyfortheALTERTABLEcommandtoexecutesuccessfully.
D.
AfterexecutingtheALTERTABLEcommand,youcanaddanewcolumncalledORDER_DATEtotheORDERStable.

WhichtwostatementsaretrueabouttheGROUPINGfunction?
PostedbyadminonSeptember8,2011

6comments

WhichtwostatementsaretrueabouttheGROUPINGfunction?(Choosetwo.)
A.
Itisusedtofindthegroupsformingthesubtotalinarow.

http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

12/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

B.
ItisusedtoidentifytheNULLvalueintheaggregatefunctions.
C.
Itisusedtoformthegroupsetsinvolvedingeneratingthetotalsandsubtotals.
D.
ItcanonlybeusedwithROLLUPandCUBEoperatorsspecifiedintheGROUPBYclause.

Thefollowingarethestepsforacorrelatedsubquery,listedinrandomorder:
PostedbyadminonSeptember8,2011

Nocomments

Thefollowingarethestepsforacorrelatedsubquery,listedinrandomorder:
1)TheWHEREclauseoftheouterqueryisevaluated.
2)Thecandidaterowisfetchedfromthetablespecifiedintheouterquery.
3)Theprocedureisrepeatedforthesubsequentrowsofthetable,tillalltherowsareprocessed.
4)Rowsarereturnedbytheinnerquery,afterbeingevaluatedwiththevaluefromthecandidaterowintheouterquery.Identifytheoptionthatcontainsthestepsin
thecorrectsequenceinwhichtheOracleserverevaluatesacorrelatedsubquery.
A.
4,2,1,3
B.
4,1,2,3
C.
2,4,1,3

D.
2,1,4,3
Whichtwostatementsaretrueregardingmultiplerowsubqueries?
PostedbyadminonSeptember8,2011

5comments

Whichtwostatementsaretrueregardingmultiplerowsubqueries?(Choosetwo.)
A.
Theycancontaingroupfunctions.

B.
Theyalwayscontainasubquerywithinasubquery.
C.
Theyusethe<ALLoperatortoimplylessthanthemaximum.
D.
Theycanbeusedtoretrievemultiplerowsfromasingletableonly.
E.
TheyshouldnotbeusedwiththeNOTINoperatorinthemainqueryifNULLislikelytobeapartoftheresultofthesubquery.

WhichstatementistrueregardingFlashbackVersionQuery?
PostedbyadminonSeptember8,2011

Nocomments

WhichstatementistrueregardingFlashbackVersionQuery?
A.
Itreturnsversionsofrowsonlywithinatransaction.
B.
ItcanbeusedinsubqueriescontainedonlyinaSELECTstatement.
C.
ItwillreturnanerroriftheundoretentiontimeislessthanthelowerboundtimeorSCNspecified.
D.
Itretrievesallversionsincludingthedeletedaswellassubsequentlyreinsertedversionsoftherows.

WhichCREATETABLEstatementisvalid?
PostedbyadminonSeptember8,2011

2comments

WhichCREATETABLEstatementisvalid?
A.
CREATETABLEord_details
(ord_noNUMBER(2)PRIMARYKEY,
item_noNUMBER(3)PRIMARYKEY,
ord_datedateNOTNULL)
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

13/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

B.
CREATETABLEord_details
(ord_noNUMBER(2)UNIQUE,NOTNULL,
item_noNUMBER(3),
ord_datedateDEFAULTSYSDATENOTNULL)
C.
CREATETABLEord_details
(ord_noNUMBER(2),
item_noNUMBER(3),
ord_datedateDEFAULTNOTNULL,
CONSTRAINTord_uqUNIQUE(ord_no),
CONSTRAINTord_pkPRIMARYKEY(ord_no))
D.
CREATETABLEord_details
(ord_noNUMBER(2),
item_noNUMBER(3),
ord_datedateDEFAULTSYSDATENOTNULL,
CONSTRAINTord_pkPRIMARYKEY(ord_no,item_no))

WhichstatementistrueregardingtheROLLUPoperatorspecifiedintheGROUPBYclauseofaSQLstatement?
PostedbyadminonSeptember8,2011

2comments

WhichstatementistrueregardingtheROLLUPoperatorspecifiedintheGROUPBYclauseofaSQLstatement?
A.
ItproducesonlythesubtotalsforthegroupsspecifiedintheGROUPBYclause.
B.
ItproducesonlythegrandtotalsforthegroupsspecifiedintheGROUPBYclause.
C.
Itproduceshigherlevelsubtotals,movingfromrighttoleftthroughthelistofgroupingcolumnsspecifiedintheGROUPBYclause.

D.
Itproduceshigherlevelsubtotals,movinginallthedirectionsthroughthelistofgroupingcolumnsspecifiedintheGROUPBYclause.
Whichoptionshouldbeusedtoperformthistaskmostefficiently?
PostedbyadminonSeptember8,2011

4comments

Evaluatethefollowingstatement:
CREATETABLEbonuses(employee_idNUMBER,bonusNUMBERDEFAULT100)Thedetailsofallemployeeswhohavemadesalesneedtobeinsertedintothe
BONUSEStable.YoucanobtainthelistofemployeeswhohavemadesalesbasedontheSALES_REP_IDcolumnoftheORDERStable.Thehumanresources
managernowdecidesthatemployeeswithasalaryof$8,000orlessshouldreceiveabonus.Thosewhohavenotmadesalesgetabonusof1%oftheirsalary.Those
whohavemadesalesgetabonusof1%oftheirsalaryandalsoasalaryincreaseof1%.ThesalaryofeachemployeecanbeobtainedfromtheEMPLOYEEStable.
Whichoptionshouldbeusedtoperformthistaskmostefficiently?
A.
MERGE

B.
UnconditionalINSERT
C.
ConditionalALLINSERT
D.
ConditionalFIRSTINSERT
WhichmandatoryclausehastobeaddedtothefollowingstatementtosuccessfullycreateanexternaltablecalledEMPDET?
PostedbyadminonSeptember8,2011

1comment

WhichmandatoryclausehastobeaddedtothefollowingstatementtosuccessfullycreateanexternaltablecalledEMPDET?
CREATETABLEempdet
(empnoCHAR(2),enameCHAR(5),deptnoNUMBER(4))
ORGANIZATIONEXTERNAL
(LOCATION(emp.dat))
A.
TYPE
B.
REJECTLIMIT
C.
DEFAULTDIRECTORY

D.
ACCESSPARAMETERS
http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

14/15

1/13/2015

1Z0047|OracleQuestions&AnswersPart3

Whichtwostatementsaretrueaboutsequencescreatedinasingleinstancedatabase?
PostedbyadminonSeptember8,2011

1comment

Whichtwostatementsaretrueaboutsequencescreatedinasingleinstancedatabase?(Choosetwo.)
A.
Thenumbersgeneratedbyasequencecanbeusedonlyforonetable.
B.
DELETE<sequencename>wouldremoveasequencefromthedatabase.
C.
CURRVALisusedtorefertothelastsequencenumberthathasbeengenerated.

D.
WhentheMAXVALUElimitforasequenceisreached,youcanincreasetheMAXVALUElimitbyusingtheALTERSEQUENCEstatement.

E.
Whenadatabaseinstanceshutsdownabnormally,thesequencenumbersthathavebeencachedbutnotusedwouldbeavailableonceagainwhenthedatabaseinstance
isrestarted.
Whichtwostatementsaretrueregardingoperatorsusedwithsubqueries?
PostedbyadminonSeptember8,2011

4comments

Whichtwostatementsaretrueregardingoperatorsusedwithsubqueries?(Choosetwo.)
A.
TheNOTINoperatorisequivalenttoISNULL.
B.
The<ANYoperatormeanslessthanthemaximum.

C.
=ANYand=ALLoperatorshavethesamefunctionality.
D.
TheINoperatorcannotbeusedinsinglerowsubqueries.
E.
TheNOToperatorcanbeusedwithIN,ANYandALLoperators.

Page3of4

2 3

Questions&Answercollection.

http://www.aiotestking.com/oracle/category/single/oracledbsqlexpert/page/3/

15/15