0% found this document useful (0 votes)
170 views20 pages

PL/SQL Programing (1Z0-147)

Uploaded by

saidi92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views20 pages

PL/SQL Programing (1Z0-147)

Uploaded by

saidi92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 20

PL/SQL PROGRAMING (1Z0-147)

1. Examine thi !"#$e%&"e'


(REA)E OR REPLA(E PRO(E*+RE *ELE)E,PLA-ER (.,I*IN N+M/ER) IS
/EGIN
*ELE)E 0ROM PLA-ER 12ERE I* 3 .,I*
E4(EP)ION 12EN S)A)S,E4I)S,E4(EP)ION )2EN
*/MS,O+)P+).P+),LINE ((ann#t *e5ete thi !5a6e"7 $hi5% "e$#"%
exit in PLA-ER,/A),S)A) ta85e)9
EN*9
1hat !"e:ent thi !"#$e%&"e ;"#m 8ein< $"eate% &$$e;&556=
A. A comma has been left after the STATS_EXI ST_EXCEPTI ON exception.
B. The STATS_EXIST_EXCEPTI ON has not been declared as a nmber.
C. The STATS_EXIST_EXCEPTI ON has not been declared as an exception.
!. Onl" predefined exceptions are allo#ed in the EXCEPTI ON section.
Ans#er$s% C
>. +n%e" ?hi$h t?# $i"$&mtan$e %# 6#& %ei<n %ata8ae t"i<<e"=
((h##e t?#)
A. To dplicate the fnctionalit" of other tri&&ers.
B. To replicate bilt'in constraints in the Oracle ser(er sch as
primar" )e" and forei&n )e".
C. To &arantee that #hen a specific operation is performed* related
actions are performed.
!. +or centrali,ed* &lobal operations that shold be fired for the
tri&&erin& statement* re&ardless of #hich ser or application isses the
statement.
Ans#er$s% C*!
@. L#$a5 !"#$e%&"e A $a55 "em#te !"#$e%&"e /. P"#$e%&"e / ?a $#m!i5e%
at A A.M. P"#$e%&"e A ?a m#%i;ie% an% "e$#m!i5e% at B A.M. Rem#te
!"#$e%&"e / ?a 5ate" m#%i;ie% an% "e$#m!i5e% at 11 A.M. )he %e!en%en$6
m#%e i et t# )I MES)AMP. 1hat ha!!en ?hen !"#$e%&"e A i in:#Ce% at 1
P.M=
A. There is no affect on procedre A and it rns sccessfll".
B. Procedre B is in(alidated and recompiles #hen in(o)ed.
C. Procedre A is in(alidated and recompiles for the first time it is
in(o)ed.
!. Procedre A is in(alidated and recompiles for the second time it is
in(o)ed.
Ans#er$s% !
4. 1hat i a $#n%iti#n !"e%i$ate in a *ML t"i<<e"=
A. A conditional predicate allo#s "o to specif" a -.EN'/O00IN0'ON
condition in the tri&&er bod".
B. A conditional predicate means "o se the NE- and O/! 1alifiers in
the tri&&er bod" as a condition.
C. A conditional predicate allo#s "o to combine se(eral !B2 tri&&erin&
e(ents into one in the tri&&er bod".
!. A conditional predicate allo#s "o to specif" a S.3T!O-N or STA4T3P
condition in the tri&&er bod".
Ans#er$s% C 5o choose correct
D. )hi tatement ;ai5 ?hen exe$&te%'
(REA)E OR REPLA(E )RIGGER (AL(,)EAM,A.G A0)ER INSER) ON PLA-ER
/EGIN
INSER) IN)O PLA-ER,/A)S)A) (PLA-ER,I*7 SEASON,-EAR7 A),/A)S7
2I)S) .AL+ES ('NE1.I*7 1BB77 07 0) 9
EN*9
)# ?hi$h t6!e m&t 6#& $#n:e"t the t"i<<e" t# $#""e$t the e""#"=
A. 4o#
B. Statement
C. O4AC/E +O42 tri&&er
!. Be f o r e
Ans#er$s% A
E. An inte"na5 LO/ i ,,,,,.
A. A table.
B. A colmn that is a primar" )e".
C. Stored in the database.
!. A file stored otside of the database* #ith an internal pointer to it
from a database
colmn.
Ans#er$s% C
7. -#& nee% t# %ia85e a55 t"i<<e" #n the EMPLO-EES ta85e. 1hi$h
$#mman% a$$#m!5ihe thi=
A. None of these commands6 "o cannot disable mltiple tri&&ers on a
table in one command.
B. A/TE4 T4I 00E4S ON TAB/E e mp l o " e e s !I SAB/E6
C. A/TE4 e mp l o " e e s !I SAB/E A// T4I 00E4S6
!. A/TE4 TAB/E emplo"ees !ISAB/E A// T4I00E4S6
Ans#er$s% !
A. -#& ha:e a "#? 5e:e5 /E0ORE +P*A)E t"i<<e" #n the EMP ta85e. )hi
t"i<<e" $#ntain a SELE() tatement #n the EMP ta85e t# en&"e that the
ne? a5a"6 :a5&e ;a55 ?ithin the minim&m an% maxim&m a5a"6 ;#" a <i:en
F#8 tit5e. 1hat ha!!en ?hen 6#& t"6 t# &!%ate a a5a"6 :a5&e in the EMP
ta85e=
A. The tri&&er fires sccessfll".
B. The tri&&er fails becase it needs to be a ro# le(el A+TE4 3P!ATE
tri&&er.
C. The tri&&er fails becase a SE/ECT statement on the table bein&
pdated is not allo#ed.
!. The tri&&er fails becase "o cannot se the minimm and maximm
fnctions in a
BE+O4E 3P!ATE tri&&er.
Ans#er$s% C
B. -#& nee% t# im!5ement a :i"t&a5 !"i:ate %ata8ae (:!%). In #"%e" t#
ha:e the :!% ;&n$ti#na5it67 a t"i<<e" i "eG&i"e% t# ;i"e ?hen e:e"6
&e" initiate a ei#n in the %ata8ae. 1hat t6!e #; t"i<<e" nee% t#
8e $"eate%=
A. !2/ tri&&er
B. S"stem e(ent tri&&er
C. INSTEA! O+ tri&&er
!. Application tri&&er
Ans#er$s% B
10. 1hi$h t?# !"#<"am %e$5a"ati#n a"e $#""e$t ;#" a t#"e% !"#<"am
&nit= ((h##e t?#)
A. C4EATE O4 4EP/ACE +3NCTION tax_amt $p_id N32BE4% 4ET34N N32BE4
B. C4EATE O4 4EP/ACE P4OCE!34E tax_amt $p_id N32BE4% 4ET34N N32BE4
C. C4EATE O4 4EP/ACE P4OCE!34E tax_amt $p_id N32BE4* p_amont O3T
N32BE4%
!. C4EATE O4 4EP/ACE +3NCTION tax_amt $p_id N32BE4% 4ET34N N32BE4$78*9%
E. C4EATE O4 4EP/ACE P4OCE!34E tax_amt $p_id N32BE4* p_amont O3T
N32BE4$78* 9%%
Ans#er$s% a*c
11. )he $"eati#n #; ?hi$h ;#&" %ata8ae #8Fe$t ?i55 $a&e a **L t"i<<e"
t# ;i"e= ((h##e ;#&")
A. Index
B. Clster
C. Pac)a&e
!. +nction
E. S"non"ms
+. !imensions
0. !atabase lin)s
Ans#er$s% ABC!

1>. Examine thi $#%e'
(REA)E OR REPLA(E PRO(E*+RE ine"t,%e!t (!,5#$ati#n,i% N+M/ER) IS
:,%e!t,i% N+M/ER(4)9
/EGIN
INSER) IN)O %e!a"tment .AL+ES
(D7 .E%&$ati#n.7 1D07 !,5#$ati#n,i%)9
SELE() %e!a"tment,i% IN)O :,%e!t,i% 0ROM em!5#6ee
12ERE em!5#6ee,i%3BBBBB9
EN* ine"t,%e!t9
/
(REA)E OR REPLA(E PRO(E*+RE ine"t,5#$ati#n ( !,5#$ati#n,i% N+M/ER7
!,$it6 .AR(2AR>) IS
/EGIN
INSER) IN)O 5#$ati#n(5#$ati#n,i%7 $it6) .AL+ES
(!,5#$ati#n,i%7 !,$it6)9
ine"t,%e!t(!,5#$ati#n,i%)9
EN* ine"t,5#$ati#n9
/
-#& F&t $"eate% the %e!a"tment7 the 5#$ati#n7 an% the em!5#6ee
ta85e. -#& %i% n#t ine"t an6 "#?. Next 6#& $"eate% 8#th !"#$e%&"e.
-#& ne? in:#Ce the ine"t,5#$ati#n !"#$e%&"e &in< the ;#55#?in<
$#mman%'
E4E(+)E ine"t,5#$ati#n (1B7 .San 0"an$i$# .) 1hat i the "e&5t in
thi E4E(+)E $#mman%=
A. The locations* departments* and emplo"ees tables are empt".
B. The departments table has one ro#. The locations and the emplo"ees
tables are empt".
C. The location table has one ro#. The departments and the emplo"ees
tables are empt".
!. The locations table and the departments table both ha(e one ro#. The
emplo"ees table is empt".
Ans#er$s% !
1@. 1hat i t"&e a8#&t t#"e% !"#$e%&"e=
A. A stored procedre ses the !E/C/A4E )e"#ord in the procedre
specification to declare formal parameters.
B. A stored procedre is named P/:S;/ bloc) #ith at least one parameter
declaration in the procedre specification.
C. A stored procedre mst ha(e at least one exectable statement in the
procedre bod".
!. A stored procedre ses the !EC/A4E )e"#ord in the procedre bod" to
declare formal parameters.
Ans#er$s% C
14. Examine the t"i<<e"'
(REA)E OR REPLA(E )RIGGER Em!,$#&nt A0)ER *ELE)E ON Em!,ta8
0OR EA(2 RO1
*EL(ARE n IN)EGER9
/EGIN
SELE() (O+N)(H) IN)O n 0ROM Em!,ta89
*M/S,O+)P+).P+),LINE( I)he"e a"e n#?J KK a KK Iem!5#6eeJ)9
EN*9
)hi t"i<<e" "e&5t in an e""#" a;te" thi SQL tatement i ente"e%'
*ELE)E 0ROM Em!,ta8 12ERE Em!n# 3 74BB9
2#? %# 6#& $#""e$t the e""#"=
A. Chan&e the tri&&er t"pe to a BE+O4E !E/ETE.
B. Ta)e ot the CO3NT fnction becase it is not allo#ed in a tri&&er.
C. 4emo(e the !B2S_O3TP3T statement becase it is not allo#ed in a
tri&&er.
!. Chan&e the tri&&er to a statement'le(el tri&&er b" remo(in& +O4 EAC.
4O-.
Ans#er$s% !
1D. )he OL* an% NE1 G&a5i;ie" $an 8e &e% in ?hi$h t6!e #; t"i<<e"=
A. 4o# le(el !2/ tri&&er
B. 4o# le(el s"stem tri&&er
C. Statement le(el !2/ tri&&er
!. 4o# le(el application tri&&er
E. Statement le(el s"stem tri&&er
+. Statement le(el application tri&&er
Ans#er$s% A
1E. 1hi$h :ie? %i!5a6 in%i"e$t %e!en%en$ie7 in%entin< ea$h
%e!en%en$6=
A. !EPT4EE
B. I!EPT4EE
C. IN!ENT_T4EE
!. I_!EPT_T4EE
Ans#er$s% B
17. Examine thi $#%e'
(REA)E OR REPLA(E PRO(E*+RE a&%it,a$ti#n (!,?h# .AR(2AR>)AS
/EGIN
INSER) IN)O a&%it($hema,&e") .AL+ES(!,?h#)9
EN* a&%it,a$ti#n9
/
(REA)E OR REPLA(E )RIGGER ?at$h,it A0)ER LOGON ON *A)A/ASE
(ALL a&%it,a$ti#n(#"a,5#<in,&e")
/
1hat %#e thi t"i<<e" %#=
A. The tri&&er records an adit trail #hen a ser ma)es chan&es to the
database.
B. The tri&&er mar)s the ser as lo&&ed on to the database before an
adit statement is issed.
C. The tri&&er in(o)ed the procedre adit_action each time a ser lo&s
on to his:her schema and adds the sername to the adit table.
!. The tri&&er in(o)es the procedre adit_action each time a ser lo&s
on to the database and adds the sername to the adit table.
Ans#er$s% !
1A. Examine thi !"#$e%&"e'
(REA)E OR REPLA(E PRO(E*+RE +P*,/A),S)A) (.,I* IN N+M/ER *E0A+L) 107
.,A/ IN N+M/ER *E0A+L) 4) IS
/EGIN
+P*A)E PLA-ER,/A),S)A) SE) A),/A)S 3 A),/A)S L .,A/
12ERE PLA-ER,I* 3 .,I*9
(OMMI)9
EN*9
1hi$h t?# tatement ?i55 &$$e;&556 in:#Ce thi !"#$e%&"e in
SQL HP5&= ((h##e t?#)
A. EXEC3TE 3P!_BAT_STAT6
B. EXEC3TE 3P!_BAT_STAT$<_AB=>78* <_I!=>?7%6
C. EXEC3TE 3P!_BAT_STAT$?7* .+O34.* .T-O.%6
!. 3P!_BAT_STAT$<_AB=>78* <_I!=>?7%6
E. 43N 3P!_BAT_STAT6
Ans#er$s% A*B
1B. Examine thi $#%e'
(REA)E OR REPLA(E 0+N()ION <en,emai5,name (!,;i"t,name .AR(2AR>7
!,5at,name .AR(2AR>7 !,i% N+M/ER) RE)+RN .AR(2AR> IS
:,emai5,name .AR(2AR>(1B)9
/EGIN
:,emai5,name '3 S+/S)R(!,;i"t,name7 17 1) KK
S+/S)R(!,5at,name7 17 7) KK .MO"a$5e.$#m .9
+P*A)E em!5#6ee SE) emai5 3 :,emai5,name
12ERE em!5#6ee,i% 3 !,i%9
RE)+RN :,emai5,name9
EN*9
1hi$h tatement "em#:e the ;&n$ti#n=
A. !4OP &en_email_name6
B. 4E2O<E &en_email_name6
C. !E/ETE &en_email_name6
!. !4OP +3NCTION &en_eamil_name6
Ans#er$s% !
>0. Examine thi $#%e'
(REA)E OR REPLA(E PA(NAGE $#mm,!a$Ca<e IS
<,$#mm N+M/ER '3 109
PRO(E*+RE "eet,$#mm(!,$#mm IN N+M/ER)9
EN* $#mm,!a$Ca<e9
/
+e" O#ne exe$&te the ;#55#?in< $#%e at B'01am'
E4E(+)E $#mm,!a$Ca<e.<,$#mm '3 1D
+e" Smith exe$&te the ;#55#?in< $#%e at B'0Dam'
E4E(+)E $#mm,!a$5a<e.<,$#mm '3 >0
?hi$h tatement i t"&e=
A. &_ comm has a (ale of 7@ at AB8Cam for Smith.
B. &_ comm has a (ale of 7@ at AB8Cam for Dones.
C. &_comm has a (ale of 98 at AB8Cam for both Dones and Smith.
!. &_comm has a (ale of 7@ at AB8? am for both Dones and Smith.
E. &_comm has a (ale of 78 at AB8Cam for both Dones and Smith.
+. &_comm has a (ale of 78 at AB8?am for both Dones and Smith
Ans#er$s% B
>1. Examine thi !a$Ca<e'
(REA)E OR REPLA(E PA(NAGE //,PA(N IS
.,MA4,)EAM,SALAR- N+M/ER(1>7>)9
PRO(E*+RE A**,PLA-ER(.,I* IN N+M/ER7 .,LAS),NAME .AR(2AR>7
.,SALAR- N+M/ER)9
EN* //,PA(N9
/
(REA)E OR REPLA(E PA(NAGE /O*- //,PA(N IS
.,PLA-ER,A.G N+M/ER(47@)9
PRO(E*+RE +P*,PLA-ER,S)A)(.,I* IN N+M/ER7
.,A/ IN N+M/ER *E0A+L) 47 .,2I)S IN N+M/ER) IS
/EGIN
+P*A)E PLA-ER,/A),S)A) SE) A),/A)S 3 A),/A)S L .,A/7 2I)S 3 2I)S L
.,2I)S
12ERE PLA-ER,I* 3 .,I*9
(OMMI)9
.ALI*A)E,PLA-ER,S)A)(.,I*)9
EN* +P*,PLA-ER,S)A)9
PRO(E*+RE A**,PLA-ER (.,I* IN N+M/ER7 .,LAS),NAME .AR(2AR>7 .,SALAR-
N+M/ER)IS
/EGIN
INSER) IN)O PLA-ER(I*7LAS),NAME7SALAR-) .AL+ES
(.,I*7 .,LAS),NAME7 .,SALAR-)9
+P*,PLA-ER,S)A)(.,I*7070)9
EN* A**,PLA-ER9
EN* //,PA(N
/
1hi$h tatement ?i55 &$$e;&556 ai<n .@@@ t# the .,PLA-ER,A.G
:a"ia85e ;"#m a !"#$e%&"e #&ti%e the !a$Ca<e=
A. <_P/A5E4_A<0 B= .???6
B. BB_PACE.3P!_P/A5E4_STAT.<_P/A5E4_A<0 B= .???6
C. BB_PACE.<_P/A5E4_A<0 B= .???6
!. This (ariable cannot be assi&ned a (ale from otside of the pac)a&e.
Ans#er$s% !
>>. 1hat $an 6#& %# ?ith the */MS,LO/ !a$Ca<e=
A. 3se the !B2S_/OB.-4ITE procedre to #rite data to a B+I/E.
B. 3se the !B2S_/OB.B+I/ENA2E fnction to locate an external B+I/E.
C. 3se the !B2S_/OB.+I/EEXISTS fnction to find the location of a B+I/E.
!. 3se the !B2S_/OB.+I/EC/OSE procedre to close the file bein&
accessed.
Ans#er$s% !
>@. Examine thi !a$Ca<e'
(REA)E OR REPLA(E PA(NAGE mana<e,em! IS
tax,"ate (ONS)AN) N+M/ER(D7>) '3 .>A9
:,i% N+M/ER9
PRO(E*+RE ine"t,em! (!,%e!tn# N+M/ER7 !,a5 N+M/ER)9
PRO(E*+RE %e5ete,em!9
PRO(E*+RE &!%ate,em!9
0+N()ION $a5$,tax (!,a5 N+M/ER) RE)+RN N+M/ER9
EN* mana<e,em!9
/
(REA)E OR REPLA(E PA(NAGE /O*- mana<e,em! IS
PRO(E*+RE &!%ate,a5 (!,"aie,amt N+M/ER) IS
/EGIN
+P*A)E em! SE) a5 3 (a5 H !,"aie,emt) L a5
12ERE em!n# 3 :,i%9
EN*9
PRO(E*+RE ine"t,em! (!,%e!tn# N+M/ER7 !,a5 N+M/ER) IS
/EGIN
INSER) IN)O em!(em!n#7 %e!tn#7 a5) .AL-ES
(:,i%7 !,%e!ntn#7 !,a5)9
EN* ine"t,em!9
PRO(E*+RE %e5ete,em! IS
/EGIN
*ELE)E 0ROM em! 12ERE em!n# 3 :,i%9
EN* %e5ete,em!9
PRO(E*+RE &!%ate,em! IS
:,a5 N+M/ER(107>)9
:,"aie N+M/ER(107 >)9
/EGIN
SELE() a5 IN)O :,a5 0ROM em! 12ERE em!n# 3 :,i%9
I0 :,a5 P D00 )2EN :,"aie '3 .0D9
ELSIP :,a5 P 1000 )2EN :,"aie '3 .079
ELSE :,"aie '3 .049
EN* I09
&!%ate,a5(:,"aie)9
EN* &!%ate,em!9
0+N()ION $a5$,tax (!,a5 N+M/ER)RE)+RN N+M/ER IS
/EGIN
RE)+RN !,a5 H tax,"ate9
EN* $a5$,tax9
EN* mana<e,em!9
/
1hat i the name #; the !"i:ate !"#$e%&"e in thi !a$Ca<e=
A. CA/C_TAX
B. INSE4T_E2P
C. 3P!ATE_SA/
!. !E/ETE_E2P
E. 3P!ATE_E2P
+. 2ANA0E_E2PS
Ans#er$s% C
>4. 1hi$h t?# %#!e the INS)EA* O0 $5a&e in a t"i<<e" i%enti;6= ((h##e
t?#)
A. The (ie# associated #ith the tri&&er.
B. The table associated #ith the tri&&er.
C. The e(ent associated #ith the tri&&er.
!. The pac)a&e associated #ith the tri&&er.
E. The statement le(el or for each ro# association to the tri&&er.
Ans#er$s% A*E
>D. 1hi$h th"ee a"e :a5i% ?a6 t# minimiQe %e!en%en$6 ;ai5&"e= ((h##e
th"ee)
A. ;er"in& #ith the SE/ECT F notification.
B. !eclarin& (ariables #ith the GT5PE attribte.
C. Specif"in& schema names #hen referencin& obHects.
!. !eclarin& records b" sin& the G4O-T5PE attribte.
E. Specif"in& pac)a&e.procedre notation #hile exectin& procedres.
Ans#er$s% A*B*!
>E. Examine thi $#%e'
(REA)E OR REPLA(E PRO(E*+RE
a%%,%e!t ( !,name %e!a"tment.%e!a"tment,nameR)-PE *E0A+L) I&nCn#?nI7
!,5#$ %e!a"tment.5#$ati#n,i%R)-PE *E0A+L) 1700) IS
/EGIN
INSER) IN)O %e!a"tment(%e!a"tment,i%7 %e!a"tment,name7
5#$5ati#n,i%) .AL+ES (%e!t,eG.NE4).AL7!,name7 !,5#$)9
EN* a%%,%e!t9
/
-#& $"eate% the a%%,%e!t !"#$e%&"e a8#:e7 an% 6#& n#? in:#Ce the
!"#$e%&"e in SQL HP5&. 1hi$h ;#&" a"e :a5i% in:#$ati#n= ((h##e ;#&")
A. EXEC3TE add_dept$p_loc=>9@88%
B. EXEC3TE add_dept$ IEdcationJ* 9@88%
C. EXEC3TE add_dept$ .9@88 * p_loc =>9@88%
!. EXEC3TE add_dept$p_name=> IEdcationJ* 9@88%
E. EXEC3TE add_dept$p_loc=>9@88* p_name=> IEdcationJ%
Ans#er$s% A* B* C*E
>7. 1hi$h t?# %e$"i8e a t#"e% !"#$e%&"e= ((h##e t?#)
A. A stored procedre is t"picall" #ritten in S;/.
B. A stored procedre is a named P/:S;/ bloc) that can accept
parameters.
C. A stored procedre is a t"pe of P/:S;/ sbpro&ram that performs an
action.
!. A stored procedre has three partsB the specification* the bod"* and
the exception handler part.
E. The exectable section of a stored procedre contains statements that
assi&ns (ales* control exection* and retrn (ales to the callin&
en(ironment.
Ans#er$s% B*C
>A. )# 8e $a55a85e ;"#m a SQL ex!"ei#n7 a &e"-%e;ine% ;&n$ti#n m&t
%# ?hat=
A. Be stored onl" in the database.
B. .a(e both IN and O3T parameters.
C. 3se the positional notation for parameters.
!. 4etrn a BOO/EAN or <A4C.A49 data t"pe.
Ans#er$s% A
>B. Examine thi !"#$e%&"e'
(REA)E OR REPLA(E PRO(E*+RE INSER),)EAM (.,I* in N+M/ER7
.,(I)- in .AR(2AR> *E0A+L) IA+S)INJ7 .,NAME in .AR(2AR>) IS
/EGIN
INSER) IN)O )EAM (i%7 $it67 name) .AL+ES (:,i%7 :,$it67 :,name)9
(OMMI)9
EN*
?hi$h t?# tatement ?i55 &$$e;&556 in:#Ce thi !"#$e%&"e in SQL
HP5&= ((h##e t?#)
A. EXEC3TE INSE4T_TEA26
B. EXEC3TE INSE4T_TEA2$?* <_NA2E=> I/ON0.O4NSJ* <_CIT5=> IA3STINJ%6
C. EXEC3TE INSE4T_TEA2$?* IA3STINJ* I/ON0.O4NSJ%6
!. EXEC3TE INSE4T_TEA2 $<_I!B= <_NA2EB=I/ON0.O4NSJ* <_CIT5 B= IA3STINJ%6
E. EXEC3TE INSE4T_TEA2 $?* I/ON0.O4NSJ%6
Ans#er$s% B*C
@0. 2#? $an 6#& mi<"ate ;"#m a LONG t# a LO/ %ata t6!e ;#" a $#5&mn=
A. 3se the !B2S_2ANA0E_/OB.2I04ATE procedre.
B. 3se the 3T/_2ANA0E_/OB.2I04ATE procedre.
C. 3se the !B2S_/OB.2I04ATE procedre.
!. 3se the A/TE4 TAB/E command.
E. 5o cannot mi&rate from a /ON0 to a /OB date t"pe for a colmn.
Ans#er$s% !
@1. -#& nee% t# "em#:e the %ata8ae t"i<<e" /+SINESS,2O+R . 1hi$h
$#mman% %# 6#& &e t# "em#:e the t"i<<e" in the SQL HP5& en:i"#nment=
A. !4OP T4I00E4 bsiness_hor6
B. !E/ETE T4I00E4 bsiness_hor6
C. 4E2O<E T4I00E4 bsiness_hor6
!. A/TE4 T4I00E4 bsiness_hor 4E2O<E6
E. !E/ETE +4O2 3SE4_T4I00E4S -.E4E T4I00E4_NA2E = .B3SINESS_.O34 .6
Ans#er$s% A
@>. A (ALL tatement ini%e the t"i<<e" 8#%6 ena85e 6#& t# $a55 ,,,,,.
A. A pac)a&e.
B. A stored fnction.
C. A stored procedre.
!. Another database tri&&er.
Ans#er$s% C
@@. -#& a"e a8#&t t# $han<e the a"<&ment #; the (AL(,)EAM,A.G ;&n$ti#n.
1hi$h %i$ti#na"6 :ie? $an 6#& G&e"6 t# %ete"mine the name #; the
!"#$e%&"e an% ;&n$ti#n that in:#Ce the (AL(,)EAM,A.G ;&n$ti#n=
A. 3SE4_P4OC_!EPEN!S
B. 3SE4_!EPEN!ENCIES
C. 3SE4_4E+E4ENCES
!. 3SE4_SO34CE
Ans#er$s% B
@4. -#& $"eate a *ML t"i<<e". 0#" the timin< in;#"mati#n7 ?hi$h i :a5i%
?ith a *ML t"i<<e"=
A. !34IN0
B. INSTEA! O+
C. ON S.3T!O-N
!. BE+O4E
E. ON STATE2ENT EXEC3TION
Ans#er$s% B
@D. 1hi$h t6!e #; a"<&ment !ae a :a5&e ;"#m a !"#$e%&"e t# the
$a55in< en:i"#nment=
A. <A4C.A49
B. BOO/EAN
C. O3T
!. IN
Ans#er$s% C
@E. -#& ?ant t# $"eate a PL/SQL 85#$C #; $#%e that $a5$&5ate %i$#&nt
#n $&t#me" #"%e". )hi $#%e ?i55 8e in:#Ce% ;"#m e:e"a5 !5a$e7 8&t
#n56 ?ithin the !"#<"am &nit OR*ER)O)AL. 1hat i the m#t a!!"#!"iate
5#$ati#n t# t#"e the $#%e that $a5$&5ate the %i$#&nt=
A. A stored procedre on the ser(er.
B. A bloc) of code in a P/:S;/ librar".
C. A standalone procedre on the client machine.
!. A bloc) of code in the bod" of the pro&ram nit O4!E4TOTA/.
E. A local sbpro&ram defined #ithin the pro&ram nit O4!E4TOTA/.
Ans#er$s% A
@7. 1hi$h tatement a8#&t t"i<<e" i t"&e=
A. 5o se an application tri&&er to fire #hen a !E/ETE statement
occrs.
B. 5o se a database tri&&er to fire #hen an INSE4T statement occrs.
C. 5o se a s"stem e(ent tri&&er to fire #hen an 3P!ATE statement
occrs.
!. 5o se INSTEA! O+ tri&&er to fire #hen a SE/ECT statement occrs.
Ans#er$s% B
@A. Examine thi !"#$e%&"e'
(REA)E OR REPLA(E PRO(E*+RE A**,PLA-ER (.,I* IN N+M/ER7 .,LAS),NAME
.AR(2AR>) IS
/EGIN
INSER) IN)O PLA-ER (I*7LAS),NAME) .AL+ES (.,I*7 .,LAS),NAME)9
(OMMI)9
EN*9
)hi !"#$e%&"e m&t in:#Ce the AP*,/A),S)A) !"#$e%&"e an% !a a
!a"amete". 1hi$h tatement7 ?hen a%%e% t# the a8#:e !"#$e%&"e ?i55
&$$e;&556 in:#Ce the +P*,/A),S)A) !"#$e%&"e=
A. EXEC3TE 3P!_BAT_STAT$<_I!%6
B. 3P!_BAT_STAT$<_I!%6
C. 43N 3P!_BAT_STAT$<_I!%6
!. STA4T 3P!_BAT_STAT$<_I!%6
Ans#er$s% B
@B. 1hi$h ;#&" t"i<<e"in< e:ent $an $a&e a t"i<<e" t# ;i"e= ((h##e
;#&")
A. A specific error or an" errors occrs.
B. A database is sht do#n or started p.
C. A specific ser or an" ser lo&s on or off.
!. A ser exectes a C4EATE or an A/TE4 table statement.
E. A ser exectes a SE/ECT statement #ith an O4!E4 B5 clase.
+. A ser exectes a DOIN statement that ses for or more tables.
Ans#er$s% A*B*C*!
40. 1hen $"eatin< a ;&n$ti#n in SQL HP5&7 6#& "e$ei:e thi mea<e'
.1a"nin<' 0&n$ti#n $"eate% ?ith $#m!i5ati#n e""#"..
1hi$h $#mman% $an 6#& i&e t# ee the a$t&a5 e""#" mea<e=
A. S.O- +3NCTION_E44O4
B. S.O- 3SE4_E44O4S
C. S.O- E44O4S
!. S.O- A//_E44O4S
Ans#er$s% C
41. )he"e i a (+S)OMER ta85e in a $hema that ha a !&85i$ 6n#n6m
(+S)OMER an% 6#& a"e <"ante% a55 #8Fe$t !"i:i5e<e #n it. -#& ha:e a
!"#$e%&"e PRO(ESS,(+S)OMER that !"#$ee $&t#me" in;#"mati#n that i
in the !&85i$ 6n#n6m (+S)OMER ta85e. -#& ha:e F&t $"eate% a ne? ta85e
$a55e% (+S)OMER ?ithin 6#&" $hema. 1hi$h tatement i t"&e=
A. Creatin& the table has no effect and procedre P4OCESS_C3STO2E4 still
accesses data from pblic s"non"m C3STO2E4 table.
B. If the strctre of "or C3STO2E4 table is the same as the pblic
s"non"m C3STO2E4 table then the procedre P4OCESS_C3STO2E4 is
in(alidated and &i(es compilation errors.
C. If the strctre of "or C3STO2E4 table is entirel" different from
the pblic s"non"m C3STO2E4 table then the procedre P4OCESS_C3STO2E4
sccessfll" recompiles and accesses "or C3STO2E4 table.
!. If the strctre of "or C3STO2E4 table is the same as the pblic
s"non"m C3STO2E4 table then the procedre P4OCESS_C3STO2E4 sccessfll"
recompiles #hen in(o)ed and accesses "or C3STO2E4 table.
Ans#er$s% !
4>. Examine thi !a$Ca<e'
(REA)E OR REPLA(E PA(NAGE //,PA(N IS
.,MA4,)EAM,SALAR- N+M/ER(1>7>)9
PRO(E*+RE A**,PLA-ER(.,I* IN N+M/ER7 .,LAS),NAME .AR(2AR>7
.,SALAR-,N+M/ER9
EN* //,PA(N9
/
(REA)E OR REPLA(E PA(NAGE /O*- //,PA(N IS
PRO(E*+RE +P*,PLA-ER,S)A) (.,I* IN N+M/ER7 .,A/ IN
N+M/ER *E0A+L) 47 .,2I)S IN N+M/ER) IS
/EGIN
+P*A)E PLA-ER,/A),S)A) SE) A),/A)S 3 A),/A)S L .,A/7
2I)S 3 2I)S L .,2I)S 12ERE PLA-ER,I* 3 .,I*)
(OMMI)9
EN* +P*,PLA-ER,S)A)9
PRO(E*+RE A**,PLA-ER (.,I* IN N+M/ER7 .,LAS),NAME
.AR(2AR>7 .,SALAR- N+M/ER) IS
/EGIN
INSER) IN)O PLA-ER(I*7LAS),NAME7SALAR-) .AL+ES
(.,I*7 .,LAS),NAME7 .,SALAR-)9
+P*,PLA-ER,S)A)(.,I*70.0)9
EN* A**,PLA-ER9
EN* //,PA(N9
1hi$h tatement ?i55 &$$e;&556 ai<n S7D70007000 t# the
.,MA4,)EAM,SALAR- :a"ia85e ;"#m ?ithin a tan%-a5#ne !"#$e%&"e=
A. <_2AX_TEA2_SA/A45 B= K@888886
B. BB_PACE.A!!_P/A5E4.<_2AX_TEA2_SA/A45 B= K@8888886
C. BB_PACE.<_2AX_TEA2_SA/A45 B= K@8888886
!. This (ariable cannot be assi&ned a (ale from otside the pac)a&e.
Ans#er$s% C
4@. Examine thi $#%e'
(REA)E OR REPLA(E )RIGGER &!%ate,em! A0)ER +P*A)E ON em!
/EGIN
INSER) IN)O a&%it,ta85e (?h#7 %ate%) .AL+ES (+SER7 S-S*A)E)9
EN*9
-#& i&e an +P*A)E $#mman% in the EMP ta85e that "e&5t in $han<in< 10
"#?.
2#? man6 "#? a"e ine"te% int# the A+*I),)A/LE =
A. 7
B. 78
C. None
!. A (ale e1al to the nmber of ro#s in the E2P table.
Ans#er$s% A
44. Examine thi !a$Ca<e'
(REA)E OR REPLA(E PA(NAGE %i$#&nt IS
<,i% N+M/ER '3 7A>B9
%i$#&nt,"ate N+M/ER '3 0.009
PRO(E*+RE %i!5a6,!"i$e (!,!"i$e N+M/ER)9
EN* %i$#&nt9
/
(REA)E OR REPLA(E PA(NAGE /O*- %i$#&nt IS
PRO(E*+RE %i!5a6,!"i$e (!,!"i$e N+M/ER) IS
/EGIN
*/MS,O+)P+).P+),LINE( .*i$#&nte% .KK
)O,(2AR(!,!"i$eHN.L(%i$#&nt,"ate7 1)))9
EN* %i!5a6,!"i$e9
/EGIN
%i$#&nt,"ate '30.109
EN* %i$#&nt9
/
1hi$h tatement i t"&e=
A. The (ale of !ISCO3NT_4ATE al#a"s remains 8.88 in a session.
B. The (ale of !ISCO3NT_4ATE is set to 8.78 each time the pac)a&e is
in(o)ed in a session.
C. The (ale of !ISCO3NT_4ATE is set to 7.88 each time the procedre
!ISP/A5_P4ICE is in(o)ed.
!. The (ale of !ISCO3NT_4ATE is set to 8.78 #hen the pac)a&e is in(o)ed
for the first time in a session.
Ans#er$s% !
4D. Examine thi $#%e'
(REA)E OR REPLA(E )RIGGER e$&"e,em! /E0ORE LOGON ON em!5#6ee
/EGIN
I0 ()O,(2AR(S-S*A)E7 .*-.) IN ( .SA).7 .S+N.)) OR
()O,(2AR(S-S*A)E7 .22>4'MI .) NO) /E)1EEN .0A'00 AN* .1A'00 ))2EN
RAISE,APPLI(A)ION,ERROR (->0D007 .-#& ma6 ine"t int# the
EMPLO-EES ta85e #n56
%&"in< 8&ine h#&". .)9
EN* I09
EN*9
1hat t6!e #; t"i<<e" i it=
A. !2/ tri&&er
B. INSTEA! O+ tri&&er
C. Application tri&&er
!. S"stem e(ent tri&&er
E. This is an in(alid tri&&er.
Ans#er$s% !
4E. 1hi$h ta85e h#&5% 6#& G&e"6 t# %ete"mine ?hen 6#&" !"#$e%&"e ?a
5at $#m!i5e%=
A. 3SE4_P4OCE!34ES
B. 3SE4_P4OCS
C. 3SE4_OBDECTS
!. 3SE4_P/S;/_3NITS
Ans#er$s% C
47. Examine thi $#%e'
(REA)E OR REPLA(E 0+N()ION <en,emai5,name (!,;i"t,name .AR(2AR>7
!,5at,name .AR(2AR>7 !,i% N+M/ER) RE)+RN .AR(2AR> i
:,emai5,name .AR(2AR>(1B)9
/EGIN
:,emai5,h#me '3 S+/S)R(!,;i"t,name7 17 1) KK S+/S)R(!,5at,name7
17 7) KK.MO"a$5e.$#m .9
+P*A)E em!5#6ee SE) emai5 3 :,emai5,name
12ERE em!5#6ee,i% 3 !,i%9
RE)+RN :,emai5,name9
EN*9
-#& "&n thi SELE() tatement'
SELE() ;i"t,name7 5at,name <en,emai5,name(;i"t,name7 5at,name7 10A)
EMAIL 0ROM em!5#6ee9
1hat #$$&"=
A. Emplo"ee 78L has his email name pdated based on the retrn reslt of
the fnction.
B. The statement fails becase fnctions called from S;/ expressions
cannot perform !2/.
C. The statement fails becase the fnctions does not contain code to
end the transaction.
!. The S;/ statement exectes sccessfll"* becase 3P!ATE and !E/ETE
statements are i&norin& in stored fnctions called from S;/ Expressions.
E. The S;/ statement exectes sccessfll" and control is passed to the
callin& en(ironment.
Ans#er$s% B
4A. 1hat !a"t #; a %ata8ae t"i<<e" %ete"mine the n&m8e" #; time the
t"i<<e" 8#%6 exe$&te=
A. Tri&&er t"pe
B. Tri&&er bod"
C. Tri&&er e(ent
!. Tri&&er timin&
Ans#er$s% C
4B. 1hat ha!!en %&"in< the exe$&te !hae ?ith %6nami$ SQL ;#" INSER)7
+P*A)E7 an% *ELE)E #!e"ati#n=
A. The ro#s are selected and ordered.
B. The (alidit" of the S;/ statement is established.
C. An area of memor" is established to process the S;/ statement.
!. The S;/ statement is rn and the nmber of ro#s processed is
retrned.
E. The area of memor" established to process the S;/ statement is
released.
Ans#er$s% !
D0. Gi:en a ;&n$ti#n (AL()A4 '
(REA)E OR REPLA(E 0+N()ION $a5$ tax (a5 N+M/ER) RE)+RN N+M/ER IS
/EGIN
RE)+RN (a5 H 0.0D)9
EN*9
I; 6#& ?ant t# "&n the a8#:e ;&n$ti#n ;"#m the SQL HP5& !"#m!t7
?hi$h tatement i t"&e=
A. 5o need to execte the command CA/CTAX$7888%6 .
B. 5o need to execte the command EXEC3TE +3NCTION calc tax6 .
C. 5o need to create a S;/ FPls en(ironment (ariable X and isse the
command
BX B= CA/CTAX$7888%6 .
!. 5o need to create a S;/ FPls en(ironment (ariable X and isse the
command
EXEC3TE BX B= CA/CTAX6
E. 5o need to create a S;/ FPls en(ironment (ariable X and isse the
command
EXEC3TE BX B= CA/CTAX$7888%6
Ans#er$s% E
D1. 1hi$h t?# %i$ti#na"6 :ie? t"a$C %e!en%en$ie= ((h##e t?#)
A. 3SE4_SO34CE
B. 3T/_!EPT4EE
C. 3SE4_OBDECTS
!. !EPT4EE_TE2PTAB
E. 3SE4_!EPEN!ENCIES
+. !BA_!EPEN!ENT_OBDECTS
Ans#er$s% !*E
D>. 1hi$h tatement a"e t"&e= ((h##e a55 that a!!56)
A. If errors occr drin& the compilation of a tri&&er* the tri&&er is
still created.
B. If errors occr drin& the compilation of a tri&&er "o can &o into
S;/ FPls and 1er" the 3SE4_T4I00E4S data dictionar" (ie# to see the
compilation errors.
C. If errors occr drin& the compilation of a tri&&er "o can se the
S.O- E44O4S command #ithin iS;/ FPls to see the compilation errors.
!. If errors occr drin& the compilation of a tri&&er "o can &o into
S;/ FPls and 1er" the 3SE4_E44O4S data dictionar" (ie# to see
compilation errors.
Ans#er$s% A* C*!
D@. -#& nee% t# $"eate a t"i<<e" #n the EMP ta85e that m#nit#" e:e"6
"#? that i $han<e% an% !5a$e thi in;#"mati#n int# the A+*I),)A/LE .
1hat t6!e #; t"i<<e" %# 6#& $"eate=
A. +O4 EAC. 4O- tri&&er on the E2P table.
B. Statement'le(el tri&&er on the E2P table.
C. +O4 EAC. 4O- tri&&er on the A3!IT_TAB/E table.
!. Statement'le(el tri&&er on the A3!IT_TAB/E table.
E. +O4 EAC. 4O- statement'le(el tri&&er on the E2P table.
Ans#er$s% A
D4. Examine thi !a$Ca<e'
(REA)E OR REPLA(E PA(NAGE //'PA(N IS
.,MA4,)EAM'SALAR N+M/ER(1>7>)9
PRO(E*+RE A**,PLA-ER(.,I* IN N+M/ER7 .,LAS),NAME .AR(2AR>7
.,SALAR- N+M/ER)9
EN* //,PA(N9
/
(REA)E OR REPLA(E PA(NAGE /O*- //,PA(N IS
PRO(E*+RE +P*,PLA-ER,S)A) (.,I* IN N+M/ER7 .,A/ IN N+M/ER *E0A+L) 47
.,2I)S IN N+M/ER) IS
/EGIN
+P*A)E PLA-ER,/A),S)A) SE) A),/A)S 3 A),/A)S L .,A/7
2I)S 3 2I)S L .,2I)S
12ERE PLA-ER,I* 3 .,I*9
(OMMI)9
EN* +P*,PLA-ER,S)A)9
PRO(E*+RE A**,PLA-ER (.,I* IN N+M/ER7 .,LAS),NAME .AR(2AR>7 .,SALAR-
N+M/ER) IS
/EGIN
INSER) IN)O PLA-ER(I*7LAS),NAME7SALAR-) .AL+ES
(.,I*7 .,LAS),NAME7 .,SALAR-)9
+P*,PLA-ER,S)A)(.,I*7070)9
EN* A**,PLA-ER9
EN* //,PA(N9
-#& maCe a $han<e t# the 8#%6 #; the //,PA(N !a$Ca<e. )he //,PA(N 8#%6
i "e$#m!i5e%.
1hat ha!!en i; the tan%-a5#ne !"#$e%&"e .ALI*A)E,PLA-ER,S)A)
"e;e"en$e thi !a$Ca<e=
A. <A/I!ATE_P/A5E4_STAT cannot recompile and mst be recreated.
B. <A/I!ATE_P/A5E4_STAT is not in(alidated.
C. <A/!IATE_P/A5E4_STAT is in(alidated.
!. <A/I!ATE_P/A5E4_STAT and BB_PACE are in(alidated.
Ans#er$s% B
DD. 1hi$h tatement i :a5i% ?hen "em#:in< !"#$e%&"e=
A. 3se a drop procedre statement to drop a standalone procedre.
B. 3se a drop procedre statement to drop a procedre that is part of a
pac)a&e. Then recompile the pac)a&e specification.
C. 3se a drop procedre statement to drop a procedre that is part of a
pac)a&e. Then recompile the pac)a&e bod".
!. +or faster remo(al and re'creation* do not se a drop procedre
statement. Instead* recompile the procedre sin& the alter procedre
statement #ith the 4E3SE SETTIN0S clase.
Ans#er$s% A
DE. Examine thi $#%e'
(REA)E OR REPLA(E PA(NAGE 8#n& IS
<,max,8#n& N+M/ER '3 .BB9
0+N()ION $a5$,8#n& (!,em!,i% N+M/ER) RE)+RN N+M/ER9
0+N()ION $a5$,a5a"6 (!,em!,i% N+M/ER) RE)+RN N+M/ER9
EN*9
/
(REA)E OR REPLA(E PA(NAGE /O*- 8#n& IS
:,a5a"6 em!5#6ee.a5a"6R)-PE9
:,8#n&em!5#6ee.$#mmii#n,!$tR)-PE9
0+N()ION $a5$,8#n& (!,em!,i% N+M/ER)RE)+RN N+M/ER IS
/EGIN
SELE() a5a"67 $#mmii#n,!$t IN)O :,a5a"67 :,8#n&
0ROM em!5#6ee 12ERE em!5#6ee,i% 3 !,em!,i%9
RE)+RN :,8#n& H :,a5a"69
EN* $a5$,8#n&
0+N()ION $a5$,a5a"6 (!,em!,i% N+M/ER) RE)+RN N+M/ER IS
/EGIN
SELE() a5a"67 $#mmii#n,!$t IN)O :,a5a"67 :,8#n&
0ROM em!5#6ee 12ERE em!5#6ee
RE)+RN :,8#n& H :,a5a"6 L :,a5a"69
EN* $a$5,a5a"69
EN* 8#n&9
/
1hi$h tatement i t"&e=
A. 5o can call the BON3S.CA/C_SA/A45 pac)a&ed fnction from an INSE4T
command a&ainst the E2P/O5EES table.
B. 5o can call the BON3S.CA/C_SA/A45 pac)a&ed fnction from a SE/ECT
command a&ainst the E2P/O5EES table.
C. 5o can call the BON3S.CA/C_SA/A45 pac)a&ed fnction form a !E/ETE
command a&ainst the E2P/O5EES table.
!. 5o can call the BON3S.CA/C_SA/A45 pac)a&ed fnction from an 3P!ATE
command a&ainst the E2P/O5EES table.
Ans#er$s% B
D7. 1hi$h $#%e $an 6#& &e t# en&"e that the a5a"6 i n#t in$"eae% 86
m#"e than 10R at a time n#" i it e:e" %e$"eae%=
A. A/TE4 TAB/E emp A!! CONST4AINT c)_sal C.ECE $sal BET-EEN sal AN!
salF7.7%6
B. C4EATE O4 4EP/ACE T4I00E4 chec)_sal BE+O4E 3P!ATE O+ sal ON emp +O4
EAC. 4O- -.EN $ne#.sal M old.sal O4 ne#.sal > old.sal F 7.7%
BE0IN 4AISE_APP/ICATION_E44O4 $ ' 98@8L* .
!o not decrease salar" not increase b" more than 78G %6
EN!6
C. C4EATE O4 4EP/ACE T4I00E4 chec)_sal BE+O4E 3P!ATE O+ sal ON emp -.EN
$ne#.sal M old.sal O4 ne#.sal > old.sal F 7.7%
BE0IN 4AISE_APP/ICATION_E44O4 $ ' 98@8L* .!o not decrease salar" not
increase b" more than 78G %6 EN!6
!. C4EATE O4 4EP/ACE T4I00E4 chec)_sal A+TE4 3P!ATE O4 sal ON emp -.EN
$ne#.sal M old.sal O4 'ne#.sal > old.sal F 7.7%
BE0IN 4AISE_APP/ICATION_E44O4 $ ' 98@8L* .!o not decrease salar" not
increase b" more than 78G %6
EN!6
Ans#er$s% B
DA. 1hi$h t?# tatement %e$"i8e the tate #; a !a$Ca<e :a"ia85e a;te"
exe$&tin< the !a$Ca<e in ?hi$h it i %e$5a"e%= ((h##e t?#)
A. It persists across transactions #ithin a session.
B. It persists from session to session for the same ser.
C. It does not persist across transaction #ithin a session.
!. It persists from ser to ser #hen the pac)a&e is in(o)ed.
E. It does not persist from session to session for the same ser.
Ans#er$s% A*E
DB. 1hi$h t?# !"#<"ammin< $#nt"&$t $an 8e <"#&!e% ?ithin a !a$Ca<e=
((h##e t?#)
A. Crsor
B. Constant
C. Tri&&er
!. Se1ence
E. <ie#
Ans#er$s% A*B
E0. 1hi$h t?# tatement a8#&t !a$Ca<e a"e t"&e= ((h##e t?#)
A. Pac)a&es can be nested.
B. 5o can pass parameters to pac)a&es.
C. A pac)a&e is loaded into memor" each time it is in(o)ed.
!. The contents of pac)a&es can be shared b" man" applications.
E. 5o can achie(e information hidin& b" ma)in& pac)a&e constrcts
pri(ate.
Ans#er$s% !*E
E1. Examine thi $#%e'
(REA)E OR REPLA(E PRO*E(+RE a%%,%e!t (!,%e!t,name .AR(2AR>
*E0A+L) .!5a$eh#5%e" .7 !,5#$ati#n .AR(2AR> *E0A+L) ./#t#n .)
IS
/EGIN
INSER) IN)O %e!a"tment .AL+ES
(%e!t,i%,eG.NE4).AL7 !,%e!t,name7
!,5#$ati#n)9
EN* a%%,%e!t9
/
1hi$h th"ee a"e :a5i% $a55 t# the a%%,%e! !"#$e%&"e = ((h##e th"ee)
A. add_dept6
B. add_dept$ .Accontin& .%6
C. add_dept$* .Ne# 5or) .%6
!. add_dept$p_location=> .Ne# 5or) .%6
Ans#er$s% A*B*!
E>. -#& ha:e $"eate% a t#"e% !"#$e%&"e *ELE)E,)EMP,)A/LE that &e
%6nami$ SQL t# "em#:e a ta85e in 6#&" $hema. -#& ha:e <"ante% the
E4E(+)E !"i:i5e<e t# &e" A #n thi !"#$e%&"e. 1hen &e" A exe$&te the
*ELE)E,)EMP,)A/LE !"#$e%&"e7 &n%e" ?h#e !"i:i5e<e a"e the #!e"ati#n
!e";#"me% 86 %e;a&5t=
A. S5S pri(ile&es
B. 5or pri(ile&es
C. Pblic pri(ile&es
!. 3ser A.s pri(ile&es
E. 3ser A cannot execte "or procedre that has d"namic S;/.
Ans#er$s% !
E@. 1hi$h th"ee a"e t"&e tatement a8#&t %e!en%ent #8Fe$t= ((h##e
th"ee)
A. In(alid obHects cannot be described.
B. An obHect #ith stats of in(alid cannot be a referenced obHect.
C. The Oracle ser(er atomaticall" records dependencies amon& obHects.
!. All schema obHects ha(e a stats that is recorded in the data
dictionar".
E. 5o can (ie# #hether an obHect is (alid or in(alid in the 3SE4_STAT3S
data dictionar" (ie#.
+. 5o can (ie# #hether an obHect is (alid or in(alid in the
3SE4_OBDECTS data dictionar" (ie#.
Ans#er$s% C*!*+
E4. Examine thi ;&n$ti#n'
(REA)E OR REPLA(E 0+N()ION (AL(,PLA-ER,A.G (.,I* in
PLA-ER,/A),S)A).PLA-ER,I*R)-PE) RE)+RN N+M/ER IS
.,A.G N+M/ER9
/EGIN SELE() 2I)S / A),/A)S IN)O .,A.G 0ROM PLA-ER,/A),S)A)
12ERE PLA-ER,I* 3 .,I*9
RE)+RN (.,A.G)9
EN*9
1hi$h tatement ?i55 &$$e;&556 in:#Ce thi ;&n$ti#n in SQL HP5&=
A. SE/ECT CA/C_P/A5E4_A<0$P/A5E4_I!% +4O2 P/A5E4_BAT_STAT6
B. EXEC3TE CA/C_P/A5E4_A<0$?7%6
C. CA/C_P/A5E4$.43T..%6
!. CA/C_P/A5E4_A<0$?7%6
E. STA4T CA/C_P/A5E4_A<0$?7%
Ans#er$s% A

You might also like