Into Statement  «Prev  Next»

Creating SQL Statements - Quiz

Quiz Questions pertaining to SQL into

Each question is worth one point. Select the best answer or answers for each question.
 
1. Refer to the following table (named Customer) in answering the quiz questions:
ID# Lastname Firstname PhoneNumber ZIP Code
1 Wynsoup Stephen 520-555-1212 85744
2 Brennan Jeffrey 123-321-5678 04325
3 Caitlin Elizabeth 444-231-5642 95439
4 Wynsoup Julie 201-453-7641 85744
5 Andrews Julie 309-123-4567 85744
6 Smith John 231-432-8711 93451
7 Jones Andy 901-213-1213 59401
8 Smith Jody 111-444-3333 84321
9 Smith John 235-654-3212 76153

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. 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. What is the correct statement to use if you want to return all rows and columns for the customer with the last name of Smith and the first name of John? How many rows will be returned by the query?
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

Correct answers:

Your Score: 0