Oracle Quiz Answer - Section 18
Oracle Quiz Answer - Section 18
Oracle Quiz Answer - Section 18
BlogulBlogurilorACADEMYORACLEANSWERS
&CHEATINGSTUFF
12NOV
Section18Quizanswers
PostedNovember12,2009byblogulblogurilorinOracleDesign.CommentsO
Test:Quiz:LogicalComparisonsandPrecedenceRules
1.WhichsymbolintheWHEREclausemeansNotEqualTo?(ChooseTwo)
NOTIN()
=+
<>
><
2.WhichofthefollowingwouldbereturnedbythisSQLstatement:
SELECTFirst_name,last_name,department_id
FROMemployees
WHEREdepartment_idIN(50,80)
ANDrst_nameLIKEC%
ORlast_nameLIKE%s%
FIRST_NAMELAST_NAMEDEPARTMENT_ID
ShellyHiggins110
FIRST_NAMELAST_NAMEDEPARTMENT_ID
CurtisDavies50
FIRST_NAMELAST_NAMEDEPARTMENT_ID
RandallMatos50
FIRST_NAMELAST_NAMEDEPARTMENT_ID
MichaelHartstein20
Alloftheabove
3.Findtheclausethatwillgivethesameresultsas:
SELECT*
FROMd_cds
WHEREcd_numberNOTIN(90,91,92);
WHEREcd_id<=90andcd_id>=92;
WHEREcd_idNOTLIKE(90,91,92);
WHEREcd_id!=90andcd_id!=91andcd_id!=92;
WHEREcd_id!=90orcd_id!=91orcd_id!=92;
https://blogulblogurilor.wordpress.com/2009/11/12/section18quizanswers2/ 1/4
2/11/2017 Section18Quizanswers|BlogulBlogurilor
WHEREcd_id!=90orcd_id!=91orcd_id!=92;
4.Whichofthefollowingisearliestintherulesofprecedence?
Concatenationoperator
Logicalcondition
Comparisoncondition
Arithmeticoperator
5.WhichofthefollowingstatementsbestdescribestherulesofprecedencewhenusingSQL?
Theorderinwhichthecolumnsaredisplayed
Theorderinwhichtheexpressionsaresorted
Theorderinwhichtheoperatorsarereturned
Theorderinwhichtheexpressionsareevaluatedandcalculated
Alloftheabove
6.WhichofthefollowingareexamplesoflogicaloperatorsthatmightbeusedinaWHEREclause.
(ChooseTwo)
AND,OR
<>,=,<=,>=,<>
NOT
LIKES
Alloftheabove
7.Whatwillbetheresultsofthefollowingselection?
SELECT*
FROMemployees
WHERElast_nameNOTLIKEA%ANDlast_nameNOTLIKEB%
AlllastnamesthatbeginwithAorB
AlllastnamesthatdonotbeginwithAorB
Norowswillbereturned.Thereisasyntaxerror
Allrowswillbereturned
Test:Quiz:SortingRows
1.AcolumnaliascanbespeciedinanORDERBYClause.TrueorFalse?
True
False
2.WhatclausemustyouplaceinaSQLstatementtohaveyourresultssortedfromhighesttolowest
salary?
ORDERBYsalaryASC
ORDERBYsalaryDESC
ORDERsalaryBYDESC
None,thedatabasealwayssortsfromhighesttolowestonthesalarycolumn.
3.WhatcolumnscanbeaddedtothefollowingSELECTstatementinitsORDERBYclause?(Choose
Three)
SELECTrst_name,last_name,salary,hire_date
https://blogulblogurilor.wordpress.com/2009/11/12/section18quizanswers2/ 2/4
2/11/2017 Section18Quizanswers|BlogulBlogurilor
SELECTrst_name,last_name,salary,hire_date
FROMemployees
WHEREdepartment_id=50
ORDERBY?????;
last_name,rst_name.
AllcolumnsintheEMPLOYEEStable.
Thetablename,EMPLOYEES,whichwouldthenautomaticallysortbyallcolumnsinthetable.
AnycolumnintheEMPLOYEEStable,anyexpressionintheSELECTlistoranyALIASinthe
SELECTlist.
Allthecolumnsinthedatabase.
4.WhichofthefollowingistrueoftheORDERBYclause:(ChooseTwo)
MustbethelastclauseoftheSQLstatement
Displaysthefetchedrowsinnoparticularorder
Defaultstoadescendingorder(DESC)
Defaultstoanascendingorder(ASC)
Test:Quiz:IntroductiontoFunctions
1.ThefunctionCOUNTisasinglerowfunction.TrueorFalse?
True
False
2.Thefollowingstatementrepresentsamultirowfunction.TrueorFalse?
SELECTMAX(salary)
FROMemployees
True
False
3.TheconversionfunctionTO_CHARisasinglerowfunction.TrueorFalse?
True
False
4.Willthefollowingstatementreturnonerow?
SELECTMAX(salary),MIN(Salary),AVG(SALARY)
FROMemployees;
No,itisillegal.YoucannotusemorethanonemultirowfunctioninaSELECTstatement
Yes,itwillreturnthehighestsalary,thelowestsalaryandtheaveragesalaryfromallemployees
Yes,itwillreturnthehighestsalaryfromeachemployee
Yes,itwillreturntheaveragesalaryfromtheemployeestable.
5.Thefollowingstatementrepresentsamultirowfunction.TrueorFalse?
SELECTUPPER(last_name)
FROMemployees;
True
https://blogulblogurilor.wordpress.com/2009/11/12/section18quizanswers2/ 3/4
2/11/2017 Section18Quizanswers|BlogulBlogurilor
True
False
Advertisements(https://en.support.wordpress.com/aboutthese
ads/)
BlogatWordPress.com.
https://blogulblogurilor.wordpress.com/2009/11/12/section18quizanswers2/ 4/4