SQL Server 1.: If Choice 2 Is Selected Set Score To 1
SQL Server 1.: If Choice 2 Is Selected Set Score To 1
SQL SERVER 1.
Drop view command is capable of removing only one view of current database. (1 true (2 !"#$%
If choice 2 is selected set score to 1.
2.
&'at is t'e difference between views and stored procedures( (1 )iews can 'ave only *reate $tatements (2 )iews can 'ave only +pdate $tatements (3 )iews can 'ave only Delete $tatements (, )iews can 'ave only $elect $tatements
If choice 4 is selected set score to 1.
3.
-o use a !%-*. statement wit' a cursor/ an e0plicit direction suc' ne0t or prior is always supplied. (1 true (2 false
If choice 2 is selected set score to 1.
4.
&'ic' of t'e following can be created using $1#( (1 *olumn *onstraint (2 -able *onstraint (3 2ot' *olumn and -able *onstraint (, 3one of t'em
If choice 3 is selected set score to 1.
5.
&'at does t'e following $1# command output select empname from %45 w'ere empname li6e 7$88879 (1 -'is displays all empname w'ose empname is wit' four letter and starting wit' :$: (2 -'is displays all empname w'ose empname starts wit' :$: (3 -'is displays all empname w'ose empname is wit' four letter and ends wit' :$: (, -'is displays all empname.
If choice 1 is selected set score to 1.
6.
)iews can filtered by using ;;;;;;;;;;;;;;; (1 &'ere clause (2 .aving clause (3 $ubqueries (, 3one of t'em
If choice 1 is selected set score to 1.
5age 1
0539090902521599 sqlserver
7.
" table named %mployee is built/ and it is ensured t'at t'e current date is to be entered into $tart&or6 column w'enever a user does not enter a value for t'e column. .ow can it be accomplis'ed( (1 +se a *.%*< constraint (2 +se a D%!"+#- constraint (3 +se a +3=1+% constraint (, 3one of t'em
If choice 2 is selected set score to 1.
8.
&'ic' of t'e following is ->+% about sub queries in $1#( (1 $ub queries must be enclosed in parent'esis (2 2%-&%%3 cannot be used wit' a sub query (3 2ot' 1 and 2 (, 3one of t'em
If choice 3 is selected set score to 1.
9.
10. &'at is t'e reason for using De83ormali@ation from t'e following(
(1 (2 (3 (, -o reduce redundancy to split one table to more tables -o ma6e our select query simpler 3one of t'em
11. -o eliminate a rule or default from database/ t'e command used is ;;;;;;;;;
(1 (2 (3 (, drop delete truncate none of t'em
12. &'ic' of t'e following is correct for t'e function -A;D"-%( in $1#(
(1 (2 (3 (, *onverts date into c'aracter string *onverts c'aracter string into date *onverts number into date *onverts c'aracter string or number into date
5age 2
0539090902521599 sqlserver
13. &'at 'appens if t'e base table of a view is deleted and an $1# $elect command is given on view
table name( (1 Bives t'e columns referred in select statement of view (2 >eports a error (3 $elect only particular columns of view table (, Autputs t'e w'ole view table
If choice 2 is selected set score to 1.
16. &'ic' data type can be used only on A+-5+- 5arameters of t'e $tored 5rocedure(
(1 (2 (3 (, -e0t n-e0t =mage *ursor
17. Autput from a table called 5#"C$ wit' two columns/ 5#"C;3"4% and "+-.A>/ is s'own below.
&'ic' of t'e following $1# statements produced it( 5#"C;-"2#%84idsummer 3ig'ts Dream/ $."<%$5%">% &aiting !or Bodot/ 2%*<%-- -'e Blass 4enagerie/ &=##="4$ (1 $%#%*- play;name DD aut'or !>A4 plays (2 $%#%*- play;name/ aut'or !>A4 plays (3 $%#%*- play;nameDD/ DD aut'or !>A4 plays (, $%#%*- play;nameDD/ DD aut'or 5#"C;-"2#% !>A4 plays
If choice 4 is selected set score to 1.
18. " table -1 'aving 100 rows is ?oined wit' a table -2 wit' 50 rows wit'out specifying t'e ?oined
column in t'e w'ere clause t'en w'at will be t'e result( (1 100 rows (2 50 rows (3 150 rows (, 5000 rows
If choice 4 is selected set score to 1.
5age 3
0539090902521599 sqlserver
19. &'ic' clause returns only one copy of eac' set of duplicate rows selected(
(1 (2 (3 (, Broup 2y Distinct +nique 3one
21. 5age split means moving rows to a new page w'en a new row is added to a full inde0 page.
(1 true (2 false
If choice 1 is selected set score to 1.
25. &'ic' of t'e following is used to assign unique numbers to columns in a database(
(1 (2 (3 (, *lusters $ynonym )iews $equences
5age ,
0539090902521599 sqlserver
26. Data types gets converted automatically depending upon t'e usage. &'ic' of t'e following is not
possible in automatic conversion of data( (1 3umber gets converted into c'aracter string (2 D"-% gets converted into c'aracter string (3 3umber gets converted into date (, 3one of t'em
If choice 3 is selected set score to 1.
27. &'at does a successful query using t'e =33%> ?oin include(
(1 (2 (3 (, t'e A3 statement t'at specifies t'e database 3+## values t'e A3 6eyword w'ic' specifies w'ic' columns t'e tables 'ave in common t'e w'ere statement w'ic' specifies t'e database
28. "fter you 'ave created a default/ use ;;;;;;;;;;;; to bind t'e default to a column or user8defined
datatype (1 sp;bindefault (2 sp;bindcolumn (3 sp;binduser (, sp;binddatatype
If choice 1 is selected set score to 1.
29. Deadloc6 occurs w'en two users 'ave loc6s on separate ob?ects and eac' user wants a loc6 on t'e
ot'er7s ob?ect. (1 true (2 false
If choice 1 is selected set score to 1.
31. &'ic' of t'e following about D%#%-% !>A4 command in $1# is false(
(1 (2 (3 (, D%#%-% !>A4 command can be used for deletion of single column value D%#%-% !>A4 command is used to delete many rows from a table D%#%-% !>A4 command is used to delete one or more rows from a table "ll of t'em
5age 5
0539090902521599 sqlserver
33. &'at is t'e process called by w'ic' c'anges to tables in a database are automatically moved to
anot'er database by t'e $1# $erver processes( (1 3ormali@ation (2 >eplication (3 =ntegrity *'ec6 (, $ynonym
If choice 2 is selected set score to 1.
34. -'e concept t'at is used to reduce redundancy in data for creation of tables is ;;;;; .
(1 (2 (3 (, )iews "liases $equence 3ormali@ation
35. " query nested wit'in a query/ w'ere t'e inner query is evaluated for eac' row in t'e outer query is
called;;;;;;;;;; . (1 Eoin (2 )iew (3 *orrelated subquery (, $ubquery
If choice 3 is selected set score to 1.
36. $1# commands are classified into 'ow many broad categories(
(1 (2 (3 (, 2 3 , 5
5age F
0539090902521599 sqlserver
38. &'ic' is t'e $1# command t'at is used to avoid t'e selection of duplicate rows(
(1 (2 (3 (, +3=1+% D=$-=3*%G*#+$=)% D=$*>%-%
5age H
0539090902521599 sqlserver
44. $uppose t'e employee tables defined 'as t'e following values namelyI %453A%453"4%$"#">C
100$>=1000 2003+##2000 3005>=1500 &'at is t'e result returned by t'e following $1# 1uery( select count(empname from employee9 (1 3 (2 1 (3 2 (, 0
If choice 3 is selected set score to 1.
45. " table -1 'aving 100 rows is ?oined wit' a table -2 wit' 50 rows wit'out specifying t'e on condition
for t'e ?oin clause/ t'en t'e number of rows in t'e output are ;;;;;;;;; . (1 100 (2 50 (3 150 (, 5000
If choice 4 is selected set score to 1.
47. &'at is t'e function t'at is used to cut off numbers to a specified number of decimal places(
(1 (2 (3 (, *+-A!! >A+3D ->+3* ->+3*"-%
5age J
0539090902521599 sqlserver
51. &'ic' is t'e $1# command t'at is used to remove t'e inde0 created(
(1 (2 (3 (, D%#%-% =3D%G D>A5 =3D%G %#=4=3"-% =3D%G >%4A)% =3D%G
55. $tate -rue or !alseI $%#%*- statement always needs to specify t'e table.
(1 true (2 false
If choice 2 is selected set score to 1.
5age 9
0539090902521599 sqlserver
56. *'oose t'e correct command to get t'e version of $1# server(
(1 (2 (3 (, a KK)%>$=A3 b )%>$=A3 c K)%>$=A3 d KKK)%>$=A3
57. &'at is t'e concept used to combine t'e tables toget'er in $1#(
(1 (2 (3 (, 3ormali@ation =nde0ing $equence Eoin
58. &'at is a query wit'in a query called w'ere t'e inner query is evaluated for eac' row in t'e outer
query( (1 Eoin (2 )iew (3 *orrelated subquery (, 3one of t'em
If choice 3 is selected set score to 1.
60. &'ic' is t'e $1# command t'at is used to reduce t'e access time(
(1 (2 (3 (, 4=3=4=L% >%D+*%-=4% =3D%G 4=3-=4%
5age 10
0539090902521599 sqlserver
66. .ow do you select all records from table named 5%>$A3 w'ere t'e value of attribute!irst3ame
starts wit' a letter8a (1 select M from 5%>$A3 w'ere !irst3ame li6e NaN (2 select M from 5%>$A3 w'ere !irst3ame li6e aN (3 select M from 5%>$A3 w'ere !irst3ame li6e aO (, select M from 5%>$A3 w'ere !irst3ame P a
If choice 2 is selected set score to 1.
68. *onsider t'e %45 table 'aving empname as empname smit' rita &'ic' of t'e following $1l
statement display all empname as capitali@ed( (1 select inticap(empname from %459 (2 select capital(empname from %459 (3 select upper(empname from %459 (, 3one of t'em
If choice 3 is selected set score to 1.
5age 11
0539090902521599 sqlserver
74. &'at will be t'e output of following sql batc'I begin tran update a1 set idP3 w'ere idP1 begin tran
insert into a1(id/name values(5/7"2*7 rollbac6 tran rollbac6 tran (1 =nner transaction will be commited and outer will be rolled bac6 (2 2ot' t'e transactions will be committed (3 2ot' t'e transactions will be rolled bac6 (, "n error will occur.
If choice 4 is selected set score to 1.
5age 12
0539090902521599 sqlserver
75. $teve is a database developer for an automobile dealers'ip. .e is designing a database to support a
&eb site t'at will be used for purc'asing automobiles. " person purc'asing an automobile from t'e &eb site will be able to customi@e 'is or 'er order by selecting t'e model and color. -'e manufacturer ma6es four different models of automobiles. -'e models can be ordered in any one of five colors. " default color is assigned to eac' model. -'e models are stored in a table named 4odels/ and t'e colors are stored in a table named *olors. -'ese tables are s'own belowI 4odels 4odels *olor=D 4odel3ame *olors *olor=D *olor3ame $teve needs to create a list of all possible model and color combinations. &'ic' script s'ould 'e use( (1 $%#%*- m.4odel3ame/ c.*olor3ame !>A4 *olors "$ c *>A$$ EA=3 4odels "$ m A>D%> 2C m.4odel3ame/ c.*olor3ame (2 $%#%*- m.4odel3ame/ c.*olor3ame !>A4 *olors "$ m =33%> EA=3 *olors "$ c A3 m.*olor=D P c.*olor=D A>D%> 2C m.4odel3ame/ c.*olor3ame (3 $%#%*- m.4odel3ame !>A4 4odels "$ m +3=A3 $%#%*- c.*olor3ame !>A4 *olors "$ c A>D%> 2C m.4odel3ame (, 3one of t'em
If choice 1 is selected set score to 1.
76. " query t'at was run by $teve yesterday too6 30 seconds/ but today it too6 F minutes. &'at is one
of t'e first t'ings t'at 'e s'ould do to increase performance of a query( (1 trigger (2 inde0es (3 c'ec6 constraint (, stored procedure
If choice 2 is selected set score to 1.
78. &'at is sorting and w'at is t'e difference between sorting and clustered inde0es(
(1 *lustered inde0es p'ysically not sorting any data/ w'ile insertingRupdating t'e table. but order by clauses sorting t'e data w'ile inserting and updating (2 -'e A>D%> 2C clause sorts query results by one or more columns up to J/0F0 bytes. -'is will 'appen by t'e time w'en we retrieve data from database. *lustered inde0es p'ysically sorting data/ w'ile insertingRupdating t'e table (3 2ot' 1 and 2 (, 3one of t'em
If choice 2 is selected set score to 1.
5age 13
0539090902521599 sqlserver
79. Eennifer is a database developer for =*=* 2an6. $'e is implementing a process t'at loads data into a
$1# $erver 2000 database. "s a part of t'is process/ data is temporarily loaded into a table named $taging. &'en t'e data load process is complete/ t'e data is deleted from t'is table. $'e will never need to recover t'is deleted data. $'e needs to ensure t'at t'e data from t'e $taging table is deleted as quic6ly as possible. &'at s'ould s'e do( (1 +se a D%#%-% statement to remove t'e data from t'e table (2 +se a ->+3*"-% -"2#% statement to remove t'e data from t'e table. (3 +se a D>A5 -"2#% statements to remove t'e data from t'e table (, +se an updatable cursor to access and remove eac' row of data from t'e table
If choice 2 is selected set score to 1.
80. &it' $1#/ 'ow are all t'e records selected from a table named :5ersons: w'ere t'e :#ast3ame: is
alp'abetically between (and including :.ansen: and :5ettersen:( (1 select M from 5ersons w'ere #ast3ame 2%-&%%3 7.ansen7 "3D 75ettersen7 (2 select M from 5ersons w'ere #ast3ameS7.ansen7 "3D #ast3ameT75ettersen7 (3 select #ast3ameS7.ansen7 "3D #ast3ameT75ettersen7 from 5ersons (, 3one of t'em
If choice 1 is selected set score to 1.
81. -om is a database developer for an automobile dealers'ip. -'e company stores its automobile
inventory data in a $1# $erver 2000 database. 4any of t'e critical queries in t'e database ?oin t'ree tables named 4a6e/ 4odel/ and 4anufacturer. -'ese tables are updated infrequently. .e wants to improve t'e response time of t'e critical queries. &'at s'ould 'e do( (1 *reate an inde0ed view on t'e tables (2 *reate a stored procedures t'at returns data from t'e tables (3 *reate a scalar user8defined function t'at returns data from t'e tables (, *reate a table8valued user8defined function t'at returns data from t'e tables
If choice 1 is selected set score to 1.
82. Dic6 is a database developer for an =- consulting company. .e is designing a database to record
information about potential consultants. .e creates a table named *andidate$6ills for t'e database. -'e table is s'own belowI *andidate$6ills *andidate=D $6ill=D Data#ast+sed 5roficiency .ow can Dic6 uniquely identify t'e s6ills for eac' consultant( (1 *reate a 5>=4">C <%C constraint on t'e *andidate=D column (2 *reate a 5>=4">C <%C constraint on t'e *andidate=D and Data#ast+sed columns (3 *reate a 5>=4">C <%C constraint on t'e *andidate=D and $6ill=D columns (, *reate a 5>=4">C <%C constraint on t'e *andidate=D/ $6ill=D/ and Data#ast+sed columns
If choice 3 is selected set score to 1.
83. *'oose t'e correct answerI !or a table named %45#AC%% wit' 5 records/ t'e $%#%*- query is as
follows $%#%*- M !>A4 %mployee/ 2ut in 'urry/ it was typed as $%#%*- J !>A4 %mployee.$o w'at will be t'e result( (1 =t will return an error (2 = will get one column wit' J five times (3 Bet J records wit' t'ree 3+## rows (, Bet one record s'owing J
If choice 2 is selected set score to 1.
5age 1,
0539090902521599 sqlserver
87. +sing query analy@er/ name 3 ways to get an accurate count of t'e number of records in a table(
(1 (2 (3 (, select *A+3-(M from -"2#%1 select rows from sysinde0es &.%>% id P A2E%*-;=D(-"2#%1 "3D indid T 2 select *ol1/*ol2 from -"2#%1 "ll of t'em
88. $teve is t'e database developer for your company7s "ccounting database. -'e database contains a
table named %mployees. -om is a member of t'e "ccounting department. -om7s database user account 'as been denied $%#%*- permissions on t'e salary and 2onus5ercentage columns of t'e %mployees table. -om 'as been granted $%#%*- permissions on all ot'er columns in t'e table. -om now requires access to all t'e data in t'e %mployees table.&'at s'ould $teve do( (1 >evo6e $%#%*- permissions on t'e $alary and 2onus5ercentage columns of t'e employees table for -oms database user account (2 "dd -om to t'e db;datareader database role (3 "dd -om to t'e db;accessadmin database role (, Brant $%#%*- permissions on t'e $alary and 2onus5ercentage columns of t'e %mployees table for -oms database user account
If choice 4 is selected set score to 1.
5age 15
0539090902521599 sqlserver
89. create table "+-.A>$( "ut'or=D int =D%3-=-C 3A- 3+##/ #ast3ame varc'ar(20 3A- 3+##/
!irst3ame varc'ar(20 3A- 3+##/ 2oo61 varc'ar(20 3A- 3+##/ 2oo62 varc'ar(20 3A- 3+##/ 2oo63 varc'ar(20 3A- 3+## -'is table definition violates w'ic' normal form( (1 !irst (2 $econd (3 -'ird (, !ourt'
If choice 1 is selected set score to 1.
90. -om 'as a table -bl4y-est. =t 'as an "!-%> -rigger !A> =3$%>- operation. =n order to
accomplis' 'is business rule 'e needs to create one more "!-%> -rigger !A> =3$%>- operation. &'ile e0ecuting t'e trigger w'at message 'e will get( (1 -rigger created successfully (2 "lready a -rigger e0ist !A> =3$%>- operation for -bl4y-est (3 3o message will be s'own and t'e trigger will get created (, -rigger will not get created
If choice 1 is selected set score to 1.
91. *onsider t'e %45 table 'aving columns empno/ ename &'ic' of t'e following $1# query fetc'es
empno t'at occur more t'an twice in t'e %45 table( (1 select count(M from %45 group by empno 'aving count(M S29 (2 select empno/ count(M from %45 'aving count(M S29 (3 select empno/ count(M from %45 w'ere count(M S29 (, select empno/ count(M from %45 group by empno 'aving count(M S2
If choice 4 is selected set score to 1.
94. &'ic' of t'e following is !"#$% about an "#-%> -"2#% command of $1#(
(1 (2 (3 (, "#-%> -"2#% command is used to create a table "#-%> -"2#% command is used to c'ange t'e column elements in a table "#-%> -"2#% command is used to delete a table 2ot' 1 and 3
5age 1F
0539090902521599 sqlserver
97. &'at does t'e following $1# query return( alter table %45 "DD ( ename varc'ar(10 3A- 3+##/
sal number (3 9 (1 Bives t'e message -able altered (2 Bives %rror message as %rror at line 1 (3 Does not give any output (, 3one of t'em
If choice 2 is selected set score to 1.
98. " database includes four tablesI t'e *ustomers table w'ic' is referenced by t'e Arders table/ t'e
Arders table w'ic' is referenced by t'e Arder Details table/ and t'e 5roducts table w'ic' is referenced by t'e Arder Details table.=t is required to delete all information in t'e database.Biven below are some $1# scripts t'at can be used( *'oose t'e correct sequence in w'ic' t'e requirements can be fulfilled.1. D%#%-% !>A4 5roducts2. D%#%-% !>A4 *ustomers3. D%#%-% !>A4 Arders,. D%#%-% !>A4 UArder DetailsVreferenced by t'e Arder Details table/ and t'e 5roducts table w'ic' is referenced by t'e Arder Details table. (1 283818, (2 182838, (3 ,818382 (, ,838281
If choice 3 is selected set score to 1.
99. &'ic' of t'e following is prevented t'roug' >eferential integrity (also called relational integrity (i
Data redundancyii Ane8to8many or many8to8many relations'ips between columns in a tableiii >ecursive ?oinsiv #oss of data from employee sabotage (1 $tatement (i is correct (2 $tatement (ii is correct (3 $tatement (iii is correct (, "ll statements are correct
If choice 2 is selected set score to 1.
5age 1H
0539090902521599 sqlserver
100.
&'ic' of t'e following statements are true about )iews(i +sed to view t'e data in different wayii +sed to maintain security by 'iding *olumns O *omple0ityiii +sed for not'ingiv -'ere are no views in $1# $erver (1 $tatement (i is correct. (2 $tatement (i is correct (3 $tatement (iv is correct. (, "ll statements are correct.
If choice 2 is selected set score to 1.
101.
=dentify t'e considerations for using t'e additional !>A4 clause to delete rows from a table based on data in ot'er tables (1 -'e second !>A4 clause may introduce a ?oin and specifies restricting criteria for t'e D%#%-% statement. (2 -'e 1st !>A4 clause identifies t'e table from w'ic' t'e rows are deleted.
(3 -'e 1st !>A4 clause specifies restricting criteria for t'e D%#%-% statement. (, -'e second !>A4 clause indicates t'e table to modify.
If choice 1 is selected AND choice 2 is selected AND choice 3 is NOT selected AND choice 4 is NOT selected set score to 1. Anything else No score defined.
102.
Eennifer is a database developer for a tec'nical training center. *urrently/ administrative employees 6eep records of students/ instructors/ courses/ and classroom assignments only on paper. -'e training center wants to eliminate t'e use of paper to 6eep records by developing a database to record t'is information. $'e designs t'e tables for t'is database. .er design is s'own belowI*lassroom*lassroom=D*lass>oom3umber*lass-ime$tudent$tudent=D#ast3ame!irst3ame .ome5'one&or65'one*ourses*ourse=D*ourse3umber*ourse-itleDescription>equired3ame=nstr uctor3ameAffice5'oneEennifer wants to promote quic6 response times for queries and minimi@e redundant data. &'at s'ould s'e do( (1 *reate a new table named =nstructors. =nclude an =nstructor=D column/ and =nstructor3ame column/and an Affice 5'one column. "dd an =nstructor=D column to t'e *ourses table. (2 4ove all t'e columns from t'e *lassroom table to t'e *ourses table/ and drop t'e *lassroom table. (3 >emove t'e 5>=4">C <%C constraint from t'e *ourses table/ and replace t'e 5>=4">C <%C constraint wit' a composite 5>=4">C <%C constraint based on t'e *ourse=D and *ourse-itle. (, >emove t'e *lassroom=D column/ and base t'e 5>=4">C <%C constraint on t'e *lassroom3umberand *lass-ime column
If choice 1 is selected set score to 1.
5age 1J
0539090902521599 sqlserver
103.
Dic6 is t'e database developer for a sporting goods company t'at e0ports products to customers worldwide. -'e company stores its sales information in a database named sales. *ustomer names are stored in a table named *ustomer in t'is database. -'e script t'at was used to create t'is table is s'own belowI *reate table *+$-A4%>$ (*ustmer=D int 3A- 3+##/*ustomer3ame varc'ar(30 3A- 3+##/ *ontact3ame varc'ar(30 3+##/ 5'one varc'ar(20 3+##/ *ountry varc'ar(30 3A3+##/*A3$->"=3- 5<;*ustomers 5>=4">C <%C (*ustomer=D -'ere are usually only one or two customers per country. .owever/ some countries 'ave as many as 20 customers. Dic6s company7s mar6eting department wants to target its advertising to countries t'at 'ave more t'an 10 customers. .e needs to create a list of t'ese countries for t'e mar6eting department. &'ic' script(s s'ould 'e use( (1 $%#%*- *ountry !>A4 *ustomers B>A+5 2C *ountry .")=3B *A+3- (*ountry S10 (2 $%#%*- -A5 10 *ountry from *ustomers (3 $%#%*- -A5 10 *ountry !>A4 *ustomers !>A4 ($%#%*- D=$-=3*- *ountry !>A4 *ustomers "$ G B>A+5 2C *ountry .")=3B *A+3-(M S 10 (, $%- >A&*A+3- 10 $%#%*- *ountry/ *A+3- (M as 3um*ountries!>A4 *ustomers B>A+5 2C *ountry A>D%> 2C 3um*ountries Desc
If choice 1 is selected set score to 1.
104.
&'ic' are t'e c'aracteristics of *A45+-% 2C clause(i -'e columns listed after t'e *A45+-% 2C clause must be t'e same as or t'e subset of t'ose t'at are listed after t'e A>D%> 2C clause.ii -o determine w'ic' summary values are generated by $1# server/ t'e column names must be specified after t'e *A45+-% 2C clause.iii -'e te0t/ nte0t or image data types cannot be included in a *A45+-% 2C clause.iv -'e format of t'e result set cannot be modified.v "n A>D%> 2C clause s'ould be used wit' t'e *A45+-% 2C clause to group rows toget'er. (1 statement (i /statement (ii and statement (v are correct. (2 statement (ii /statement (iii and statement (v are correct. (3 statement (ii /statement (iv and statement (v are correct. (, "ll t'e statements are correct
If choice 4 is selected set score to 1.
105.
*'oose t'e categories of commands on w'ic' t'e -riggers can be used. (1 =nsert (2 +pdate (3 Delete (, alter
If choice 1 is selected AND choice 2 is selected AND choice 3 is selected AND choice 4 is NOT selected set score to 1. Anything else No score defined.
5age 19
0539090902521599 sqlserver
106.
-om is t'e database developer for a publis'ing company. .e creates t'e following stored procedure to report t'e year8to8date sales for a particular boo6 titleI *>%"-% 5>A*%D+>% get;sales;for;title Ntitle varc'ar(J0 / Kytd;sales int A+-5+-"$ $%#%*Kytd;sales P ytd;sales !>A4 titles &.%>% title P Ktitle =! KK>A&*A+3- P 0 >%-+>3(81 %#$% >%-+>3(0 -om is creating a script t'at will e0ecute t'is stored procedure. =f t'e stored procedure e0ecutes successfully/ it s'ould report t'e year8to8date sales for t'e boo6 title. =f t'e stored procedure fails to e0ecute/ it s'ould report t'e following messageI:3o $ales !ound:.ow s'ould 'e create t'e script( (1 D%*#">% Kretval intD%*#">% Kytd int%G%* get;sales;for;title 3et %tiquette/ Kytd=! Kretval T 05>=3- 3o sales found%#$%5>=3- Cear to date salesI Q $-> (Kytd BA (2 D%*#">% Kretval intD%*#">% Kytd int%G%* get;sales;for;title 3et %tiquette/ Kytd A+-5+-=! Kretval T 05>=3- 3o sales found%#$%5>=3- Cear to date salesI Q $-> (Kytd BA (3 D%*#">% Kretval intD%*#">% Kytd int%G%* get;sales;for;title 3et %tiquette/Kretval A+-5+-=! Kretval T 05>=3- 3o sales found%#$%5>=3- Cear to date salesI Q $-> (Kytd BA (, D%*#">% Kretval intD%*#">% Kytd int%G%* Kretval P get;sales;for;title 3et %tiquette/ Kytd A+-5+-=! Kretval T 05>=3- 3o sales found%#$%5>=3- Cear to date salesI Q $-> (Kytd BA
If choice 4 is selected set score to 1.
107.
&'en does =3$-%"D A! trigger gets e0ecuted(i after t'e 5rimary <ey and foreign 6ey constraints are c'ec6.ii automatically before t'e 5rimary <ey and !oreign <ey constraints are c'ec6ed.iii in an undefined order. (1 Anly statement (i is correct. (2 Anly statement (ii is correct. (3 Anly staement (ii and (iii are correct. (, 3one of t'e statements are correct.
If choice 2 is selected set score to 1.
108.
Eennifer is a database developer for a organi@ation t'at sells garden gnomes. $'e is creating a database t'at will store a 'istory of eac' order. Arders are entered directly from t'e customer in an online system. !or eac' new order in t'e system/ a unique order number must be assigned. Arder numbers must be assigned in ascending order. An a normal day/ 1/000 orders are entered into t'e system. &'en creating t'e order table/ s'e creates a Arder=D column to store t'e order number. &'at is t'e best t'ing to do ne0t( (1 $et t'e data type of t'e Arder=D column to int/ and set t'e "+-A3+42%> property for t'e column. (2 $et t'e data type of t'e Arder=D column to int/ and set t'e =D%3-=-C property for t'e column (3 $et t'e data type of t'e Arder=D column to uniqueidentifier. (, $et t'e data type of t'e Arder=D column to int. $et t'e column default to $%#%*4"G(Arder=D Q 1.
If choice 2 is selected set score to 1.
5age 20
0539090902521599 sqlserver
109.
&'ic' of t'e following options are correct(between searc' condition Ii =s used in place of an e0pression t'at includes t'e "3D operator wit' two comparison operators.ii =s used to include t'e end value in t'e result set.iii 3A- 2%-&%%3 searc' conditions used to searc' for an e0clusive range.iv 3A- 2%-&%%3 searc' condition is used to retrieve rows outside of t'e specified range of data to be retrieved.v $ingle quotation mar6s are placed around t'e searc' condition. (1 statement (i /statement (ii and statement (iii are correct. (2 statement (i /statement (ii and statement (iv are correct. (3 statement (i /statement (iii and statement (v are correct. (, statement (iii /statement (iv and statement (v are correct.
If choice 2 is selected set score to 1.
110.
*'oose t'e correct optionI&.%>% clausei can be used to limit t'e number of columns t'at are returned to t'e result set.ii can be used to limit t'e number of rows t'at are returned to t'e result set.iii 5lace brac6ets around all c'ar/nc'ar/varc'ar/nvarc'ar/te0t/datetime and smalldatetime data.iv 5lace single quotation mar6s around all c'ar/nc'ar/varc'ar/nvarc'ar/te0t/datetime and smalldatetime data.v can be used wit' t'e select statement. (1 statement (i /statement (ii and statement (iii are correct. (2 statement (ii /statement (iv and statement (v are correct. (3 statement (ii /statement (iii and statement (v are correct . (, all statements are correct.
If choice 2 is selected set score to 1.
111.
&'ic' of t'e following are advantages of using aliases for table names( (1 =nclude a series of ?oins wit'in a select statement (2 .elps you to maintain -ransact sql (3 !acilitate a batc' of comple0 ?oins (, !acilitate reading of scripts
If choice 1 is NOT selected AND choice 2 is selected AND choice 3 is selected AND choice 4 is selected set score to 1. Anything else No score defined.
112.
"rrange in order t'e operations on cursor Ii Declare t'e cursor and fill it.ii Apen it."rrange in order t'e operations on cursor Ii Declare t'e cursor and fill it.ii Apen it.iii !etc' from it.iv *lose cursor and deallocate it. (1 a i/ii/iii/iv (2 a ii/i/iii/iv (3 a i/iii/ii/iv (, a ii/iii/=/iv
If choice 1 is selected set score to 1.
5age 21
0539090902521599 sqlserver
113.
Eennifer is a database developer for a container manufacturing company. -'e containers produced by 'er company are a number of different si@es and s'apes. -'e tables t'at store t'e container information are s'own belowI$i@e$i@[email protected]'t*ontainer*ontainer=D$'ape=D$i@e=D$'ape$'ape=D$'ape3ame 4easurements" sample of t'e data stored in t'e tables is s'own belowI$i@e -able$i@e=D. $i@e3ame. .eig't1.............$mall..........,02...........4edium.......F03.............#arge....J0,............Eumbo........100$ 'ape -able$'ape=D.$'ape3ame.4easurement1.......-riangle..102.......-riangle..203.......-riangle..30,....... $quare....205.......$quare....30J.......*ircle......259.......*ircle......355eriodically/ t'e dimensions of t'e containers c'ange. !requently/ t'e database users require t'e volume of a container. -'e volume of a container is calculated based on information in t'e s'ape and si@e tables. Eennifer needs to 'ide t'e details of t'e calculation so t'at t'e volume can be easily accessed in a $%#%*- query wit' t'e rest of t'e container information.&'at s'ould s'e do( (1 *reate a user8defined function t'at requires *ontainer=D as an argument and returns t'e volume of t'e container (2 *reate a stored procedure t'at requires *ontainer=D as an argument and returns t'e volume of t'e container (3 "dd a column named volume to t'e container table. *reate a trigger t'at calculates and store t'e volume in t'is column w'en a new container is inserted into t'e table (, "dd a computed column to t'e container table t'at calculates t'e volume of t'e container
If choice 1 is selected set score to 1.
5age 22
0539090902521599 sqlserver
114.
Dic6 is designing a database t'at will contain customer orders. *ustomers will be able to order multiple products eac' time t'ey place an order. .e reviews t'e database design/ w'ic' is s'ow belowI *ustomers W *ustomer=D W *ompany3ame W "ddress W *ity W $tate Arders W Arder=D W 5roduct=D W ArderDate W 1uantity W *ustomer=D 5roducts W 5roduct=D W Description W +nit5rice Dic6 wants to promote quic6 response times for queries and minimi@e redundant data. &'at s'ould 'e do( (%ac' correct answer presents part of t'e solution. *'oose two (1 *reate a new order table named ArdersDetail. "dd Arder=D/ 5roduct=D/ and 1uantity columns to t'is table.
(2 *reate a composite 5>=4">C <%C constraint on t'e Arder=D and 5roduct=D columns of t'e Arders table (3 >emove t'e 5roduct=D and 1uantity columns from t'e Arders table (, *reate a +3=1+% constraint on t'e Arder=D column of t'e Arders table
If choice 1 is NOT selected AND choice 2 is selected AND choice 3 is NOT selected AND choice 4 is selected set score to 1. Anything else No score defined.
115.
=dentify t'e guidelines for c'anging column names. (1 =nclude upto 1J2 c'aracters in a column alias. (2 $eparate t'e column names (3 =nclude single quotation mar6s for column names t'at 'ave blan6 spaces. (, "void creating column aliases for computed columns t'at contains functions or string literals.
(5 +se t'e *>%"-% -"2#% statement to designate column names. -'ese names are displayed in t'e result set by default.
If choice 1 is NOT selected AND choice 2 is NOT selected AND choice 3 is selected AND choice 4 is NOT selected AND choice 5 is selected set score to 1. Anything else No score defined.
5age 23
0539090902521599 sqlserver
116.
&'ic' of t'e following are *'aracteristics of loc6ing(i 3o data can be updated w'ile it is being read.ii 3o data can be read w'ile it is being updated.iii &'ile $1# statement gets e0ecuted automatically D2" loc6s data called implicit loc6ing. (1 Anly $tatement (i is correct (2 $tatement (i and statement (iii are correct (3 $tatement (ii and statement (iv are correct (, "ll statements are correct.
If choice 4 is selected set score to 1.
117.
&'ic' of t'e following is correct about *>%"-% !+3*-=A3 statement(i $pecifies t'e input parameters wit' t'eir data typesii $pecifies t'e value returned wit' eac' data typeiii $pecifies t'e output parameters wit' t'eir data typeiv +ses t'e Betdate( function in t'e body of a user defined functionv $pecifies t'e processing instructions (1 $tatement (i /$tatement (ii and $tatement (v are correct (2 $tatement (ii /$tatement (iii and $tatement (v are correct (3 $tatement (i /$tatement (ii and $tatement (iv are correct (, $tatement (ii /$tatement (iv and $tatement (v are correct
If choice 1 is selected set score to 1.
118.
$elect t'e type(s of outer ?oin UAne or moreV. (1 #eft (2 !ull outer (3 >ig't (, $emi Auter
If choice 1 is selected AND choice 2 is selected AND choice 3 is selected AND choice 4 is NOT selected set score to 1. Anything else No score defined.
119.
Data from t'e result set is to be placed into a table created. *'oose t'e guidelines to follow w'en using t'e $%#%*- =3-A statement. (1 =nclude upto 1J2 c'aracters in a column alias.
(2 $eparate t'e column names wit' commas/ e0cept for t'e last column name. (3 =nclude single quotation mar6s for column names t'at 'ave blan6 spaces. (, "void creating column aliases for computed columns t'at contains functions or string literals.
(5 +se t'e *>%"-% -"2#% statement to designate column names. -'ese names are displayed in t'e result set by default.
If choice 1 is NOT selected AND choice 2 is NOT selected AND choice 3 is selected AND choice 4 is NOT selected AND choice 5 is selected set score to 1. Anything else No score defined.
5age 2,
0539090902521599 sqlserver
120.
&'ic' of t'e following are true for *A45+-% clause(i -'e $%#%*- =3-A statement s'ould not be used in t'e same statement as *A45+-% clause.ii "n A>D%> 2C clause must not be used wit' t'e *A45+-% clause.iii -'e format of result set cannot be modified.iv -'e rows generated by $1# server are determined by t'e column names specified after t'e *A45+-% clause.v 4ultiple *A45+-% clause can be used wit' t'e *A45+-% 2C clause in a single statement.vi -'e te0t/ nte0t/ or image data types cannot be included in a *A45+-% clause.vii =t is a requirement of $1# $erver t'at t'e same columns s'ould be specified in t'e *A45+-% clause as t'ose listed in t'e select list. (1 statement (i /statement (iii /statement (v /statement (vi and statement (vii are correct. (2 statement (i /statement (ii /statement (iii /statement (iv and statement (v are correct. (3 statement (ii /statement (iii /statement (iv /statement (v and statement (vii are correct. (, "ll statements are correct
If choice 1 is selected set score to 1.
121.
&'ic' is a correlated subquery mimic6ing a EA=3 clause wit' t'e correct synta0 to find all t'e "ut'ors of boo6s wit' more t'an one title (1 +$% #ibrary select distinct aut'or from -=-#% t1 w'ere aut'or ( select t2.aut'or from -=-#% t2 w'ere t1.title;noSt2.title;no (2 +$% #ibrary select distinct t1.aut'or from -=-#% t1 w'ere t1.aut'or ( select t2.aut'or from -=-#% t2 w'ere t1.title;no TS t2.title;no (3 +$% #ibrary select M from -=-#% w'ere t1.aut'or =3( select t2.aut'or from -=-#% t2 w'ere t1.title;no TS t2.title;no (, +$% #ibrary select titles from "+-.A> t1 &.%>% title =3 ( select t2.aut'or from -=-#% t2 &.%>% t1.title;no S t2.title;no
If choice 2 is selected set score to 1.
5age 25