Into Statement  «Prev  Next»

Creating SQL Statements - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. Refer to the following Customer table in answering quiz questions 1, 2, and 3.
ID#LastnameFirstnamePhoneNumberZIP Code
1WynsoupStephen520-555-121285744
2BrennanJeffrey123-321-567804325
3CaitlinElizabeth444-231-564295439
4WynsoupJulie201-453-764185744
5AndrewsJulie309-123-456785744
6SmithJohn231-432-871193451
7JonesAndy901-213-121359401
8SmithJody111-444-333384321
9SmithJohn235-654-321276153
How many rows will be returned by the statement SELECT * FROM Customer WHERE LastName='Wynsoup'?
Please select the best answer.
  A. 1
  B. 2
  C. 3
  D. 4

2. Using the Customer table above, what information will be returned by the statement SELECT ZipCode, Firstname, Lastname, PhoneNumber FROM Customer WHERE Firstname LIKE 'J%'?
Please select the best answer.
  A. The ZIP Code, Firstname, Lastname, and PhoneNumber columns will be returned for all rows in the table
  B. The ZIP Code, Firstname, Lastname, and PhoneNumber columns will be returned for rows 2, 3, 4, and 5
  C. The ZIP Code, Firstname, Lastname, and PhoneNumber columns will be returned for rows 2, 4, 5, 6, 8 and 9
  D. No information will be returned

3. Using the Customer table above, what is the correct statement to return all rows and columns for customers with the last name Smith and the first name John? How many rows will be returned?
Please select the best answer.
  A. SELECT * FROM Customer WHERE Lastname='Smith' AND Firstname='John' — 1 row will be returned
  B. SELECT * FROM Customer WHERE Lastname='Smith' AND Firstname='John' — 2 rows will be returned
  C. SELECT Lastname, Firstname FROM Customer WHERE Lastname='Smith' AND Firstname='John' — 2 rows will be returned
  D. SELECT * FROM Customer — 1 row will be returned