Sunteți pe pagina 1din 17

Question: 1.

Which SELECT statement should you use if you want to display unique combinations of the POSITION and M N !E" #alues f$om the EMPLO%EE table& ' SELECT (ISTINCT position) mana*e$ +"OM employee, -' SELECT position) mana*e$ (ISTINCT +"OM employee, C' SELECT position) mana*e$ +"OM employee, (' SELECT position) (ISTINCT mana*e$ +"OM employee, Question: 2 Which is an .S/L0Plus command& ' INSE"T -' 1P( TE C' SELECT (' (ESC"I-E E' (ELETE +' "EN ME Question: 3. %ou need to p$oduce a $epo$t fo$ mailin* labels fo$ all custome$s' The mailin* label must ha#e only the custome$ name and add$ess' The C1STOME"S table has these columns2 C1ST3I( N1M-E"456 C1ST3N ME 7 "C8 "94:;;6 C1ST3 (("ESS 7 "C8 "94:<;6 C1ST3P8ONE 7 "C8 "949;6 NOT N1LL

Which SELECT statement accomplishes this tas=& ' SELECT0 +"OM custome$s, -' SELECT name) add$ess +"OM custome$s, C' SELECT id) name) add$ess) phone +"OM custome$s, (' SELECT cust3name) cust3add$ess +"OM custome$s, E' SELECT cust3id) cust3name) cust3add$ess) cust3phone +"OM custome$s,' Question: 4. Which two statements a$e t$ue $e*a$din* the O"(E" -% clause& 4Choose two6 ' The so$t is in ascendin* by o$de$ by default' -' The so$t is in descendin* o$de$ by default' C' The O"(E" -% clause must p$ecede the W8E"E clause' (' The O"(E" -% clause is e>ecuted on the client side' E' The O"(E" -% clause comes last in the SELECT statement' +' The O"(E" -% clause is e>ecuted fi$st in the que$y e>ecution

Question: 5. Which S/L SELECT statements pe$fo$ms a p$o?ection) a selection) and ?oin when e>ecuted& ' SELECT p'id3numbe$) m'manufactu$e$3id) m'city +"OM p$oduct p) manufactu$e$ m W8E"E p'manufactu$e$3id @ m'manufactu$e$3id N( m'manufactu$e$3id @ AN+:;;B9A, -' SELECT id3numbe$) manufactu$e$3id +"OM p$oduct O"(E" -% manufactu$e$3id) id3numbe$, C' SELECT id3numbe$) manufactu$e$3id +"OM p$oduct W8E"E manufactu$e$3id @ AN+:;;B9A, (' SELECT manufactu$e$3id) city +"OM manufactu$e$ N( manufactu$e$3id @ AN+:;;B9A O"(E" -% city Question: 6. The C1STOME"S table has these columns2 C1STOME"3I( N1M-E"456 NOT N1LL C1STOME"3N ME 7 "C8 "94:;;6 NOT N1LL ST"EET3 (("ESS 7 "C8 "94:<;6 CIT%3 (("ESS 7 "C8 "94<;6 ST TE3 (("ESS 7 "C8 "94<;6 P"O7INCE3 (("ESS 7 "C8 "94<;6 CO1NT"%3 (("ESS 7 "C8 "94<;6 POST L3CO(E 7 "C8 "94:96 C1STOME"3P8ONE 7 "C8 "949;6 Which statement finds the $ows in the C1STOME"S table that do not ha#e a postal code& ' SELECT custome$3id) custome$3name +"OM custome$s W8E"E postal3code CONT INS N1LL, -' SELECT custome$3id) custome$3name +"OM custome$s W8E"E postal3code @ A33333333A, C' SELECT custome$3id) custome$3name +"OM custome$s W8E"E postal3code IS N1LL, (' SELECT custome$3id) custome$3name +"OM custome$s W8E"E postal code IS N7L, E' SELECT custome$3id) custome$3name +"OM custome$s W8E"E postal3code @ N1LL,

Question: 7. E#aluate these two S/L statements2 SELECT last3name) sala$y ) hi$e3date +"OM EMPLO%EES O"(E" -% sala$y (ESC, SELECT last3name) sala$y) hi$e3date +"OM EMPLO%EES O"(E" -% 9 (ESC, What is t$ue about them& ' The two statements p$oduce identical $esults' -' The second statement $etu$ns a synta> e$$o$' C' The$e is no need to specify (ESC because the $esults a$e so$ted in descendin* o$de$ by default' (' The two statements can be made to p$oduce identical $esults by addin* a column alias fo$ the sala$y column in the second S/L statement Question: 7. %ou a$e fo$mulatin* que$ies in a S/L0Plus' Which of the followin* statement co$$ectly desc$ibes how to specify a column alias& ' Place the alias at the be*innin* of the statement to desc$ibe the table' -' Place the alias afte$ each column sepa$ated by a space to desc$ibe the column' C' Place the alias afte$ each column sepa$ated by a comma to desc$ibe the column' (' Place the alias at the end of the statement to desc$ibe the table'

Question: 8. %ou want to use a function in you column clause of a S/L statement' The N7L function accomplishes which of the followin* tas=s& ' ssists in the dist$ibution of output ac$oss multiple columns' -' Enables you to specify alte$nate output fo$ nonCN1LL column #alues' C' Enables you to specify alte$nated out fo$ N1LL column #alues' (' Nullifies the #alue of the column out put' Question:9. %ou need to display the last names of those employees who ha#e the lette$ D E as the second cha$acte$ in thei$ names' Which S/L statement displays the $equi$ed $esults& ' SELECT last3name +"OM EMP W8E"E last3name LIFE G3 HI, -' SELECT last3name +"OM EMP W8E"E last name @I0 HI

C' SELECT last3name +"OM EMP W8E"E last name @I3 HI, (' SELECT last3name +"OM EMP W8E"E last name LIFE G0 HI Question:10. %ou want to display the titles of boo=s that meet these c$ite$ia2 :' Pu$chased befo$e Janua$y 9:) 9;;: 9' P$ice is less then K<;; o$ *$eate$ than KL;; %ou want to so$t the $esults by thei$ data of pu$chase) sta$tin* with the most $ecently bou*ht boo=' Which statement should you use& ' SELECT boo=3title +"OM boo=s W8E"E p$ice between <;; and L;; N( pu$chase3date M I9:CJ NC9;;:I O"(E" -% pu$chase3date, -' SELECT boo=3title +"OM boo=s W8E"E p$ice IN 4<;;)L;;6 N( pu$chase3date M I9:CJ NC9;;:I O"(E" -% pu$chase date SC, C' SELECT boo=3title +"OM boo=s W8E"E p$ice M <;; o$ N L;; N( pu$chase3date M I9:CJ NC9;;:I O"(E" -% pu$chase date (ESC, (' SELECT boo=3title +"OM boo=s W8E"E 4p$ice M <;; O" p$ice N L;;6 N( pu$chase3date M I9:CJ NC9;;:I O"(E" -% pu$chase date (ESC, Question:11 Which two statements a$e t$ue about W8E"E and 8 7IN! clauses& 4Choose two6 a' W8E"E clause can be used to $est$ict both $ows and *$oups' b' W8E"E clause can be used to $est$ict $ows only' c' 8 7IN! clause can be used to $est$ict both $ows and *$oups' d' 8 7IN! clause can be used to $est$ict *$oups only' e' W8E"E clause C NNOT be used in a que$y of the que$y uses a 8 7IN! clause' f' 8 7IN! clause C NNOT be used in subque$ies' Question:12 %ou would li=e to display the system date in the fo$mat OMonday) ;: June) 9;;:O' Which SELECT statement should you use&

' SELECT TO3( TE4S%S( TE) A+M( %) (( Month) %%%%A6 +"OM dual, -' SELECT TO3C8 "4S%S( TE) A+M(() (% Month) A%%%A6 +"OM dual, C' SELECT TO3C8 "4S%S( TE) A+M(ay) (( Month) %%%%A6 +"OM dual, (' SELECT TO3C8 "4S%S( TE) A+M(%) ((( Month) %%%%A6 +"OM dual, E' SELECT TO3( TE4S%S( TE) A+M(%) ((( Month) %%%%A6 +"OM dual, Question:13 :B' Evaluate

the SQL statement: SELECT ROUND(45.953, - !, TRUNC(45.93", #! $RO% &ual' (h)*h values a+e &)s,la-e&. /. 4" an& 45 0. 4" an& 45.93 C. 51 an& 45.93 D. 51 an& 45.9 E. 45 an& 45.93 $. 45.95 an& 45.93

Question:14 . E>amine the desc$iption of the EMPLO%EES table2 Employee3id Last3name +i$st3name (ept3id Job3Cat Sala$y Numbe$456 7a$cha$949<6 7a$cha$949<6 Numbe$456 7a$cha$949<6 Numbe$456 Not Null Not Null

Which statement shows the depa$tment I() minimum sala$y) and ma>imum sala$y paid in that depa$tment) only of the minimum sala$y is less then <;;; and the ma>imum sala$y is mo$e than :<;;;& ' SELECT dept3id) MIN4sala$y4) M P4sala$y6 +"OM employees W8E"E MIN4sala$y6 M <;;; N( M P4sala$y6 N :<;;;,

-' SELECT dept3id) MIN4sala$y6) M P4sala$y6 +"OM employees W8E"E MIN4sala$y6 M <;;; N( M P4sala$y6 N :<;;; !"O1P -% dept3id, C' SELECT dept3id) MIN4sala$y6) M P4sala$y6 +"OM employees 8 7IN! MIN4sala$y6 M <;;; N( M P4sala$y6 N :<;;;, (' SELECT dept3id) MIN4sala$y6) M P4sala$y6 +"OM employees !"O1P -% dept3id 8 7IN! MIN4sala$y6 M <;;; N( M P4sala$y6 N :<;;;, E' SELECT dept3id) MIN4sala$y6) M P4sala$y6 +"OM employees !"O1P -% dept3id) sala$y 8 7IN! MIN4sala$y6 M <;;; N( M P4sala$y6 N :<;;;, Question:15. Which two a$e t$ue about a**$e*ate functions& 4Choose two'6 ' %ou can use a**$e*ate functions in any clause of a SELECT statement' -' %ou can use a**$e*ate functions only in the column list of the SELECT clause and in the W8E"E clause of a SELECT statement' C' %ou can mi> sin*le $ow columns with a**$e*ate functions in the column list of a SELECT statement by *$oupin* on the sin*le $ow columns' (' %ou can pass column names) e>p$essions) constants) o$ functions as pa$amete$s to an a**$e*ate function' E' %ou can use a**$e*ate functions on a table) only by *$oupin* the whole table as one sin*le *$oup' +' %ou cannot *$oup the $ows of a table by mo$e than one column while usin* a**$e*ate functions' Question:16 Which S/L statement accepts use$ input fo$ the columns to be displayed) the table name) and W8E"E condition& ' SELECT Q:) OQ9O +"OM QB W8E"E last3name @ AQ5A, -' SELECT Q:) AQ9A +"OM QB W8E"E AQlast3name @ AQ5A A, C' SELECT Q:) Q9 +"OM QB W8E"E last3name @ AQ5A, (' SELECT Q:) AQ9A +"OM EMP W8E"E last3name @ AQ5A, Question:17

E>amine the st$uctu$e of the EMPLO%EES and NEW3EMPLO%EES tables2 EMPLO%EES2 EMPLO%EE3I( N1M-E" P$ima$y Fey +I"ST3N ME 7 "C8 "9 49<6 L ST3N ME 7 "C8 "9 49<6 8I"E3( TE ( TE NEW EMPLO%EES2 EMPLO%EE3I( N1M-E" P$ima$y Fey N ME 7 "C8 "9 4R;6 Which (ELETE statement is #alid& ' (ELETE +"OM employees W8E"E employee3id @ 4SELECT employee3id +"OM employees6, -' (ELETE 0 +"OM employees W8E"E employee3id @ 4SELECT employee3id +"OM new3employees6, C' (ELETE +"OM employees W8E"E employee3id IN 4SELECT employee3id +"OM new3employees W8E"E name @ ACa$$eyA6, (' (ELETE 0 +"OM employees W8E"E employee3id IN 4SELECT employee3id +"OM new3employees W8E"E last3name @ ACa$$eyA6, Question:18 The IN7ENTO"% table contains these columns2 I(3N1M-E" N1M-E" PF (ESC"IPTION 7 "C8 "94B;6 S1PPLIE"3I( N1M-E" %ou want to c$eate a que$y that fo$ each session allows the use$ to input a #alue fo$ (ESC"IPTION each time the que$y $uns' While the (ESC"IPTION column is sto$ed in uppe$ case) you want the que$y to $et$ie#e matchin* #alues $e*a$dless of the case used when inputtin* the substitution #a$iable #alue' Which SELECT statement should you use& ' SELECT id3numbe$) supplie$3id +"OM in#ento$y W8E"E desc$iption @ 1PPE"4Qdesc$iption6, -' SELECT id3numbe$) supplie$3id +"OM in#ento$y W8E"E LOWE"4desc$iption6 @ LOWE"4AQdesc$iptionA6, C' SELECT id3numbe$) supplie$3id +"OM in#ento$y W8E"E LOWE"4desc$iption6 @ AQdesc$iptionA, (' SELECT id3numbe$) supplie$3id +"OM in#ento$y W8E"E desc$iption @ 1PPE"4AQQdesc$iptionA6,

Question:19 Which fou$ a$e co$$ect *uidelines fo$ namin* database tables& 4Choose fou$6 ' Must be*in with eithe$ a numbe$ o$ a lette$' -' Must be :CB; cha$acte$s lon*' C' Should not be an O$acle Se$#e$ $ese$#ed wo$d' (' Must contain only CS) aCT) ;CU) 3) 0) and V' E' Must contain only CS) aCT) ;CL) 3) K) and V' +' Must be*in with a lette$' Question:20 E>amine the st$uctu$e of the EMPLO%EES table2 Column name (ata type "ema$=s EMPLO%EE3I( N1M-E" NOT N1LL) P$ima$y Fey L ST3N ME 7 "CN "94B;6 +I"ST3N ME 7 "CN "94B;6 JO-3I( N1M-E" S L N1M-E" M!"3I( N1M-E" "efe$ences EMPLO%EE3I( column (EP "TMENT3I( N1M-E" %ou need to c$eate an inde> called N ME3I(P on the fi$st name and last name fields of the EMPLO%EES table' Which S/L statement would you use to pe$fo$m this tas=& ' C"E TE IN(EP N ME3I(P 4fi$st3name) last3name6, -' C"E TE IN(EP N ME3I(P 4fi$st3name N( last3name6, C' C"E TE IN(EP N ME3I(P ON 4fi$st3name) last3name6, (' C"E TE IN(EP N ME3I(P ON employees 4fi$st3name N( last3name6, E' C"E TE IN(EP N ME3I(P ON employees4fi$st3name) last3name6, +' C"E TE IN(EP N ME3I(P +O" employees4fi$st3name) last3name6, Question: 21 E>amine the st$uctu$e of the EMPLO%EE table' EMPLOYEE Table EMPLO%EE3I( N1M-E" NOT N1LL) P$ima$y Fey EMP3LN ME 7 "C8 "9 49<6 EMP3+N ME 7 "C8 "9 49<6 (EPT3I( N1M-E" +o$ei*n =ey to (EPT3I( column of the (EP "TMENT table JO-3I( N1M-E" +o$ei*n =ey to JO-3I( column of the JO- table M!"3I( N1M-E" "efe$ences EMPLO%EE3I( column S L "% N1M-E" 4L)96 8I"E3( TE ( TE (P- ( TE Which statement should you use to inc$ease the EMP3LN ME column len*th to 9< if the column

cu$$ently contains B;;; $eco$ds& ' %ou C NNOT inc$ease the width of the EMP3LN ME column' -' LTE" T -LE employee MO(I+% emp3lname 7 "C8 "949<6, C' LTE" T -LE employee "EN ME emp3lname 7 "C8 "949<6, (' LTE" employee T -LE MO(I+% COL1MN emp3lname 7 "C8 "949<6, E' LTE" employee T -LE MO(I+% COL1MN 4emp3lname 7 "C8 "949<66,

Question: 22 E#aluate this statement2 SELECT 0 +"OM *$e*'custome$, If as use$ Chan you e>ecute this statement successfully) which statement must be t$ue& ' The C1STOME" table e>ists in use$ !$e*As schema' -' The C1STOME" table was c$eated in the (- schema' C' The C1STOME" table was c$eated in the public schema' (' The C1STOME" table is accessible to all use$s' Question: 23 E>amine the st$uctu$e of the P"O(1CT table' P"O(1CT3I( N1M-E" NOT N1LL) P$ima$y Fey P"O(1CT3N ME 7 "C8 "9 49<6 S1PPLIE"3I( N1M-E" +o$ei*n =ey to S1PPLIE"3I( of the S1PPLIE" table LIST3P"ICE N1M-E" 4W)96 COST N1M-E" 4W)96 /T%3IN3STOCF N1M-E" /T%3ON3O"(E" N1M-E" "EO"(E"3LE7EL N1M-E" "EO"(E"3/T% N1M-E" %ou need to $educe the LIST3P"ICE column p$ecision to R with a scale of 9 and ensu$e that when inse$tin* a $ow into the P"O(1CT table without a #alue fo$ the LIST3P"ICE column) a p$ice of K<';; will automatically be inse$ted' The P"O(1CT table cu$$ently contains no $eco$ds' Which statement should you use& ' LTE" T -LE p$oduct (( O" "EPL CE 4list3p$ice N1M-E"4X)96 (E+ 1LT <6, -' LTE" T -LE p$oduct MO(I+% 4list3p$ice N1M-E"4R)96 (E+ 1LT <6, C' LTE" T -LE p$oduct MO(I+% COL1MN 4list3p$ice N1M-E"4R)96 (E+ 1LT AK<';;A6, (' LTE" T -LE p$oduct MO(I+% 4list3p$ice N1M-E"4X)96 (E+ 1LT <6

"EPL CE COL1MN 4list3p$ice N1M-E"4R)96, E' %ou C NNOT $educe the siTe of the LIST3P"ICE column'

Question: 24 %ou need to chan*e the definition of an e>istin* table' The COMME"CI LS table needs its (ESC"IPTION column chan*ed to hold #a$yin* len*th cha$acte$s up to 9;;; bytes' The column can cu$$ently hold :;;; bytes pe$ #alue' The table contains 9;;;; $ows' Which statement is #alid& ' LTE" T -LE comme$cials MO(I+% 4desc$iption C8 "949;;;66, -' LTE" T -LE comme$cials C8 N!E 4desc$iption C8 "949;;;66, C' LTE" T -LE comme$cials C8 N!E 4desc$iption 7 "C8 "949;;;66, (' LTE" T -LE comme$cials MO(I+% 4desc$iption 7 "C8 "949;;;66, E' %ou cannot inc$ease the siTe of a column if the table has $ows Question: 25 Which S/L statement defines the +O"EI!N FE% const$aint on the (EPTNO column of the EMP table& ' C"E TE T -LE EMP 4empno N1M-E"456) ename 7 "CN "94B<6) deptno N1M-E"4W)96 NOT N1LL CONST" INT emp3deptno3f= +O"EI!N FE% deptno "E+E"ENCES dept deptno6, -' C"E TE T -LE EMP 4empno N1M-E"456) ename 7 "CN "94B<6) deptno N1M-E"4W)96 CONST" INT emp3deptno3f= "E+E"ENCES dept 4deptno66, C' C"E TE T -LE EMP 4empno N1M-E"456 ename 7 "C8 "94B<6) deptno N1M-E"4W)96 NOT N1LL) CONST" INT emp3deptno3f= "E+E"ENCES dept 4deptno6 +O"EI!N FE% 4deptno66, (' C"E TE T -LE EMP 4empno N1M-E" 456) ename 7 "CN "94B<6) deptno N1M-E"4W)96 +O"EI!N FE% CONST" INT emp deptno f= "E+E"ENCES dept 4deptno66,

Question: 26

Which two statements about const$aints a$e t$ue& 4Choose two'6 ' Const$aints only enfo$ce $ules at the table le#el' -' Const$aints p$e#ent a table with dependencies f$om bein* deleted' C' Const$aints can be c$eated at the same time as the table o$ afte$ the table is c$eated' (' %ou must p$o#ide a name fo$ each const$aint at the time of its c$eation' E' Const$aint names a$e NOT $equi$ed to follow the standa$d ob?ectCnamin* $ules' Question: 27 Which statement e>plicitly names a const$aint& ' LTE" T -LE student3*$ades (( +O"EI!N FE% 4student3id6 "E+E"ENCES students4student3id6, -' LTE" T -LE student3*$ades (( CONST" INT N ME @ student3id3f= +O"EI!N FE% 4student3id6 "E+E"ENCES students4student3id6, C' LTE" T -LE student3*$ades (( CONST" INT student3id3f= +O"EI!N FE% 4student3id6 "E+E"ENCES students4student3id6, (' LTE" T -LE student *$ades (( N ME( CONST" INT student3id3f= +O"EI!N FE% 4student3id6 "E+E"ENCES students4student3id6, E' LTE" T -LE student *$ades (( N ME student3id3f= +O"EI!N FE% 4student3id6 "E+E"ENCES students4student3id6, Question: 28

E>amine the S/L statements that c$eates O"(E"S table2 C"E TE T -LE o$de$s 4SE"3NO N1M-E" 1NI/1E) O"(E"3I( N1M-E") O"(E"3( TE ( TE NOT N1LL ST T1S 7 "C8 "(94:;6 C8ECF 4status IN 4GC"E(ITI)IC S8I66) P"O(3I(3N1M-E" "E+E"ENCES P"O(1CTS4P"O(1CT3I(6) O"(3TOT L N1M-E") P"IM "% FE% 4o$de$ id) o$de$ date66, +o$ which columns would an inde> be automatically c$eated when you e>ecute the abo#e S/L statement& 4Choose two6 ' SE"3NO -' O"(E"3I( C' ST T1S (' P"O(3I(' E' O"(3TOT L +' Composite inde> on O"(E"3I( and O"(E"3( TE Question: 28

%ou maintain two tables) C1STOME" and P"OSPECT) that ha#e identical st$uctu$es but diffe$ent data' %ou want to synch$oniTe these two tables by inse$tin* $eco$ds f$om the P"OSPECT table into the C1STOME" table) if they do not e>ist' If the custome$ al$eady e>ists in the C1STOME" table) you want to update custome$ data' Which (ML statement should you use to pe$fo$m this tas=& ' INSE"T -' 1P( TE C' S%NC (' ME"!E E' %ou C NNOT pe$fo$m this tas= with one (ML ope$ation Question: 29 E>amine the st$uctu$e of the EMPLO%EES table2 EMPLO%EE3I( N1M-E" P$ima$y Fey +I"ST3N ME 7 "CN "949<6 L ST3N ME 7 "CN "949<6 Which th$ee statements inse$ts a $ow into the table& 4Choose th$ee6 ' INSE"T INTO employees 7 L1ES 4 N1LL) GJohnI)GSmithI6, -' INSE"T INTO employees4 fi$st3name) last3name6 7 L1ES4GJohnI)GSmithI6, C' INSE"T INTO employees 7 L1ES 4G:;;;I)GJohnI)N1LL6, (' INSE"T INTO employees4fi$st3name)last3name) employee3id6 7 L1ES 4 :;;;) GJohnI)GSmithI6, E' INSE"T INTO employees 4employee3id6 7 L1ES 4:;;;6, +' INSE"T INTO employees 4employee3id) fi$st3name) last3name6 7 L1ES 4 :;;;) GJohnI)GI6, Question: 30 %ou c$eated a #iew called EMP3(EPT371 that contains th$ee columns f$om the EMPLO%EES and (EP "TMENTS tables2 EMPLO%EE3I() EMPLO%EE3N ME N( (EP "TMENT3N ME'

The (EP "TMENT3I( column of the EMPLO%EES table is the fo$ei*n =ey to the p$ima$y =ey (EP "TMENT3I( column of the (EP "TMENTS table' %ou want to modify the #iew by addin* a fou$th column) M N !E"3I( of N1M-E" data type f$om the EMPLO%EES tables'

8ow can you accomplish this tas=& ' LTE" 7IEW emp3dept3#u 4 (( mana*e$3id N1M-E"6, -' MO(I+% 7IEW emp3dept3#u 4 (( mana*e$3id N1M-E"6, C' LTE" 7IEW emp3dept3#u S SELECT employee3id) employee3name) depa$tment3name) mana*e$3id +"OM employee e) depa$tments d W8E"E e'depa$tment3id @ d'depa$tment3id, (' MO(I+% 7IEW emp3dept3#u S SELECT employee3id) employee3name) depa$tment3name) mana*e$3id +"OM employees e) depa$tments d W8E"E e'depa$tment3id @ d'depa$tment3id, E' C"E TE O" "EPL CE 7IEW emp3dept3#u S SELECT employee3id) employee3name) depa$tment3name) mana*e$3id +"OM employees e) depa$tments d W8E"E e'depa$tment3id @ d'depa$tment3id, +' %ou must $emo#e the e>istin* #iew fi$st) and then $un the C"E TE 7IEW command with a new column list to modify a #iew'

Question: 31 Lo**ed on as use$ nn) you issue these S/L statements2 C"E TE T -LE custome$ 4 custome$3id N1M-E") company3id 7 "C8 "94B;6) contact3name 7 "C8 "94B;6) contact3title 7 "C8 "949;6) add$ess 7 "C8 "94B;6) city 7 "C8 "949<6) $e*ion 7 "C8 "94:;6) postal3code 7 "C8 "949;6) count$y3id N1M-E") phone 7 "C8 "949;6) fa> 7 "C8 "949;6) c$edit3limit N1M-E" 4W)966, C"E TE P1-LIC S%NON%M cust +O" custome$, !" NT SELECT ON custome$ TO chan, Which SELECT statements could use$ Chan issue to access the C1STOME" table& 4Choose all that apply'6

' SELECT 0 +"OM ann'custome$, -' SELECT custome$3id +"OM custome$, C' SELECT custome$3name) phone +"OM cust, (' SELECT 0 +"OM ann'cust, E' SELECT CO1NT4city6 +"OM chan'cust Question: 32 E>amine the st$uctu$e of the P"O(1CT table' P"O(1CT3I( N1M-E" P"O(1CT3N ME S1PPLIE"3I( N1M-E" LIST3P"ICE Y COST /T%3IN3STOCF /T%3ON3O"(E" "EO"(E"3LE7EL "EO"(E"3/T% NOT N1LL) P$ima$y Fey 7 "C8 "9 49<6 +o$ei*n =ey to S1PPLIE"3I( of the S1PPLIE" table N1M-E" 4W)96 N1M-E" 4W)96 N1M-E" N1M-E" N1M-E" N1M-E"

%ou need to $educe the LIST3P"ICE column p$ecision to R with a scale of 9 and ensu$e that when inse$tin* a $ow into the P"O(1CT table without a #alue fo$ the LIST3P"ICE column) a p$ice of K<';; will automatically be inse$ted' The P"O(1CT table cu$$ently contains no $eco$ds' Which statement should you use& ' LTE" T -LE p$oduct (( O" "EPL CE 4list3p$ice N1M-E"4X)96 (E+ 1LT <6, -' LTE" T -LE p$oduct MO(I+% 4list3p$ice N1M-E"4R)96 (E+ 1LT <6, C' LTE" T -LE p$oduct MO(I+% COL1MN 4list3p$ice N1M-E"4R)96 (E+ 1LT AK<';;A6, (' LTE" T -LE p$oduct MO(I+% 4list3p$ice N1M-E"4X)96 (E+ 1LT <6 "EPL CE COL1MN 4list3p$ice N1M-E"4R)96, E' %ou C NNOT $educe the siTe of the LIST3P"ICE column Question: 33 E>amine the st$uctu$e of the C1""3O"(E" table as shown below2 !""#O"$E" Table O"(E"3I( N1M-E" NOT N1LL) P$ima$y Fey C1STOME"3I( N1M-E" NOT N1LL) +o$ei*n Fey to C1STOME"3I( column of the C1STOME"S table EMP3I( N1M-E" NOT N1LL) +o$ei*n Fey to EMP3I( column of the EMPLO%EES table O"(E"3(T ( TE NOT N1LL O"(E"3 MT N1M-E" 4W)96 S8IP3MET8O( 7 "C8 "9 4<6 %ou c$eated the O"(E"37 #iew selectin* all $ows and columns f$om the O"(E" table whe$e the amount of the o$de$ was o#e$ K9<; and the date of the o$de$ was afte$ Janua$y :) 9;;;' The

C"E TE 7IEW statement included the WIT8 C8ECF OPTION clause' Which statement will e>ecute successfully& ' INSE"T INTO o$de$3# 4o$de$3id) custome$3id) emp3id) o$de$3dt) o$de$3amt6 7 L1ES 4X5;) 9L9) :;5) A:;COCTC9;;:A) B:X6, -' INSE"T INTO o$de$3# 4o$de$3id) custome$3id) emp3id) o$de$3amt) ship3method6 7 L1ES 4LBR) 9L9) :;5) 9<R'B) A1PPSA6, C' INSE"T INTO o$de$3# 4o$de$3id) custome$3id) emp3id) o$de$3dt) o$de$3amt) ship3method6 7 L1ES 4:R5) 9L9) :;5) A:;CM %C9;;:A) B'<R) A1PPSA6, (' INSE"T INTO o$de$3# 4o$de$3id) custome$3id) emp3id) o$de$3dt) o$de$3amt) ship3method6 7 L1ES 49;B) 9L9) :;5) A:;COCTC:LLLA) 9LX'5) A1PPSA6,

Question: 34 Which data dictiona$y table should you que$y to #iew the ob?ect p$i#ile*es *$anted to the use$ on specific columns& ' 1SE"3T -3P"I7S3M (E -' 1SE"3T -3P"I7S C' 1SE"3COL3P"I7S3M (E (' 1SE"3COL3P"I7S Question: 35 Scott issues the S/L statements2 C"E TE T -LE dept 4deptno N1M-E"496) dname 7 "C8 "94:56) loc 7 "C8 "94:B6Z, !" NT SELECT ON (EPT TO S1E, If Sue needs to select f$om ScottAs (EPT table) which command should she use& ' SELECT 0 +"OM (EPT, -' SELECT 0 +"OM SCOTT'(EPT, C' SELECT 0 +"OM (- 'SCOTT'(EPT, (' SELECT 0 +"OM LL3 1SE"S W8E"E 1SE"3N ME @ ASCOTTA N( T -LE N ME @ A(EPTA, Question: 36 The (- issues this S/L command 2 C"E TE 1SE" scott I(ENTI+IES by ti*e$,

What p$i#ile*es does the use$ Scott ha#e at this point& ' No p$i#ile*es' -' Only the SELECT p$i#ile*e' C' Only the CONNECT p$i#ile*e' (' ll the p$i#ile*es of a default use$ Question: 37 Which p$i#ile*e is an ob?ect p$i#ile*e& ' IN(EP -' ("OP 1SE" C' C"E TE SESSION (' - CF1P N% T -LE

Question: 38 E>amine the st$uctu$e of the EMP3(EPT371 #iew2 Column Name Type "ema$=s EMPLO%EE3I( EMP3N ME JO-3I( S L "% (EP "TMENT3I( (EPT3N ME N1M-E" 7 "C8 "94B;6 7 "C8 "949;6 N1M-E" N1M-E" 7 "C8 "94B;6 +$om the EMPLO%EES table +$om the EMPLO%EES table +$om the EMPLO%EES table +$om the EMPLO%EES table +$om the (EP "TMENTS table +$om the (EP "TMENTS table

Which S/L statement p$oduces an e$$o$& ' SELECT 0 +"OM emp3dept3#u, -' SELECT depa$tment3id) S1M4sala$y6 +"OM emp3dept3#u !"O1P -% depa$tment3id, C' SELECT depa$tment3id) ?ob3id) 7!4sala$y6 +"OM emp3dept3#u !"O1P -% depa$tment3id) ?ob3id, (' SELECT ?ob3id) S1M4sala$y6 +"OM emp3dept3#u W8E"E depa$tment3id IN 4:;)9;6 !"O1P -% ?ob3id 8 7IN! S1M4sala$y6 N 9;;;;, E' None of the statements p$oduce an e$$o$, all a$e #alid'

Question:39 Which const$aint can be defined only at the column le#el& ' 1NI/1E -' NOT N1LL C' C8ECF (' P"IM "% FE%

E' +O"EI!N FE%

Question:40 % Which two statements about subque$ies a$e t$ue& 4Choose two'6 ' subque$y should $et$ie#e only one $ow' -' subque$y can $et$ie#e Te$o o$ mo$e $ows' C' subque$y can be used only in S/L que$y statements' (' Subque$ies C NNOT be nested by mo$e than two le#els' E' subque$y C NNOT be used in an S/L que$y statement that uses *$oup functions' +' When a subque$y is used with an inequality compa$ison ope$ato$ in the oute$ S/L statement) the column list in the SELECT clause of the subque$y should contain only one column'

S-ar putea să vă placă și