You are on page 1of 3

Section 1 1. What does the following SQL SELECT statement return? SELECT UPPER( SU STR(!"ata#ase Programming!$ %&STR(!"ata#ase Programming!$!P!

'$()'' *R+, dualPR+.R/,,%&. (0' (. Whi1h 2uer3 sele1ts the first names of the "4 +n "emand 1lients who ha5e a first name #eginning with 6/6? SELECT UPPER(first7name' *R+, d71lients W8ERE L+WER(first7name' L%9E !a:! (0' ;. Whi1h 1hara1ter mani<ulation fun1tion alwa3s returns a numeri1al 5alue? LE&.T8 (0' =. Whi1h 2uer3 would return a user <assword 1om#ining the %" of an em<lo3ee and the first = digits of the last name? SELECT C+&C/T (em<lo3ee7id$ SU STR(last7name$1$='' /S 6User Passwords6 *R+, em<lo3ees (0' >. Chara1ter fun1tions a11e<t 1hara1ter arguments and onl3 return 1hara1ter 5alues. True or *alse? *alse (0' ?. Whi1h of the following are t3<es of SQL fun1tions? (Choose two 1orre1t answers.' ,ulti@Row *un1tions (0' Single@Row *un1tions (0' A. Whi1h of the following SQL statements would 1orre1tl3 return a song title identified in the data#ase as 6/ll These Bears6? W8ERE title L%9E %&%TC/P(!:all these 3ears!'- (0' C. %dentif3 the out<ut from the following SQL statementD SELECT RP/"(!SQL!$?$ !0!' *R+, "U/LSQL000 (0'

E. The answer to the following s1ri<t is =>?. True or *alse? SELECT TRU&C(R+U&"(=>?.EC'' *R+, dual*alse (0' 1). R+U&" and TRU&C fun1tions 1an #e used with whi1h of the following "atat3<es? "ates and num#ers (0' 11. Whi1h num#er fun1tion ma3 #e used to determine if a 5alue is odd or e5en? ,+" (0' 1(. What is the result of the following SQL StatementD SELECT R+U&"(=>.E(;$@1' *R+, "U/L>) (0' 1;. Whi1h 2uer3 would return a whole num#er if the s3sdate is (?F,/BF())=? SELECT TRU&C(,+&T8S7 ETWEE&(SBS"/TE$!1EF,/RF1EAE!' F1(' /S BE/RS *R+, "U/L- (0' 1=. Round and Trun1 1annot #e used on "ate datat3<es. True or *alse? *alse (0' 1>. What is the result of the following 2uer3? SELECT /""7,+&T8S (!11F4/&F1EE=!$?' *R+, dualAF11F1EE= (0' 1?. What is the result of the following 2uer3? SELECT /""7BE/RS (!11F4/&F1EE=!$?' *R+, dualThis in not a 5alid SQL statement. (0' 1A. What fun1tion would 3ou use to return the highest date in a month? L/ST7"/B (0'

1C. %f hire7date has a 5alue of !);F4ul3F());!$ then what is the out<ut from this 1ode? SELECT R+U&"(hire7date$ !Bear!' *R+, em<lo3ees)1F4/&F())= (0'

You might also like