Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Which af the follnuring blocks will compile, and which will fail to compilef Why?
A.
DrcTARE
tresHate HrE;
laeLDace t{iEtBffi; EreIH NUt L;
E!{D;
b.
mfine
laetdate, DHIE ,= slrsdate; laaLlhEe IIIJMBER. := 50;
EffiITN
IF
TfiEr..}
1999 ellleaqf ! * } ;
Il
STSIIFTm
TIIEN
E!tr}
EIID;
tk
prsf;. rlI
]Why doesn't the foltonring cade crmpile? EffiIU IF' STSIBIE > II)-UATE (' 01-.7nN-1999*, rm-lrcfg-Yytr'
TIIES
)
I@0UIFOT. PIII_I*IIIE
1!lgg elreadlr!
Effi
TfiEN
'l
DESf,S_OUIPUI.HTLLII{E
ET{D
IF;
ElE;
Rewrite the following IF staternent to get rid of unnecessary nested IFs: IF sal^ar!, < 10000
TIE!{
horm6 := 1500;
E,sE
40000
1000; 500;
bonue
END
EBID
:=
IF;
II';
EHD
IF;
Sfhich of [he fnllonring narned excepti{xrs are deftned by PI"TSQIJ fl. TATH,_I([I. rcE[D b. rlerrrc m
C. NC-IIHEA.-ETXIIID d. pnrrsE-B:r-EERo
e.w
What do 1rou see orl your screen (a message clelivered via DtsMS_OUTPLff, or an unhandled exception, or perhaps nothing *t all) when you execute this block?
Uffit;EE
rqldrea
\rARCmR2 {5}
Vhat do you see on your screen (a message delivered via DBMS_OUTPUT, or an unhandled exception, or perhaps nothirrg ar all) when you
execute this blnckf
DtrIARE
my-drem
VARCITARZ
ffiIII{
BffiIIH
Iry_..fhreanr UfCnefLOnf
(5) ;
:=, rrfUSf[{E' ;
HEHS UAH'E-EHROR
lmBT
mAS-.lCfnWf.PUt_LINE
E![D;
('Imer block,,l
UB{S-OGI9IIf"PIII-LI]IE
END;
rDroan defemed. . ., ] ;
i[ mean to be fln *nplic# cilrsor in a FUSQL prograrn? $fhich of the foUouring SQt staternents are implicit cursors?
Wrhat does, A. BEHtrI
UFDA5B preteremcee
SHf
IWERE
lCEffif,ATEl
b. rcr*ns CUflffiar@ohe-etrr rs
SELEEE
job, fre$rncqf
ElqI
adolesqrrtJimrkload
ne*t-ke1'
ffi
SE
qfloye.
e*p1o1ee_id$ffpE;
Ef
euplolee_seq.NEelTfAL
nEI) rext-tcey
FROM
&.ral;
MIfBER;
change the following block so rhar ir rraps a NO_DATAJOUND e.xcep tion and displays a description s:f the currerlt rror:
IIECLANE
urlf
EEEIN
tr-arnor
SqEqlP
EIFO
fqrr-flavor qg-flavor
FRnil ice_cream
ll '!,);
FLJT,
Vhat do you see on your $creen {a message delivered via DBMS_O1I[of an unhandled exception, or perhaps nothing at all) when you
rEr-drean 1trRCffiR2(101
:=
riIIlSEfCE,,-
Emq{
UEEE,AHE
reality
Bmns
\rAECI{AR2
{3} :='![IIrLIOtitS
SEAR\IE'
I,Itmer blodct) ;
wry
mp;
TErlirlE_ryfrory:
tf
b, Different rows tn an indeuc-by table can hold diffierent tfpes of inforulation. Row l, ftrr erample, uright contain another index-by table, while,rCIsr 2 contains a string. c. Index-by tables can be sttrred in the, daabase as columns in a tabfe,