Register|Login

Have a question? Click here to ask the community.

Quiz 6 – Selecting Data With The Where Clause

| In: MySQL Quizzes | 7,688 views

*You are currently not logged in and your quiz score will not be recorded. Please login or register if you would like to submit your quiz score.

Directions: Answer all questions. Any questions skipped will be scored as wrong answers. Good Luck! :)

Example Database


Table Name: contacts

rowfirstNameage
0Robert25
1Justin18
2Chris38
3Robert65
4Beth23

1. Refering to the Example Database above, which row/s would be selected if the following MySQL Query was executed:

mysql_query(“SELECT * FROM contacts WHERE firstName=’Robert'”);

Row 0
Row 3
Row 0 & Row 3
Row 0 & Row 1

2. Refering to the Example Database above, which row/s would be selected if the following MySQL Query was executed:

mysql_query(“SELECT * FROM contacts WHERE age > ’20′”);

Row 0
Row 0 & Row 1
Row 0 & Row 3 & Row 4
Every row except Row 1

3. Refering to the Example Database above, which row/s would be selected if the following MySQL Query was executed:

mysql_query(“SELECT * FROM contacts
WHERE age > ’26’ AND firstName=’Robert'”);

Row 3
Row 0 & Row 3
Row 0 & Row 3 & Row 4
All of the above

4. Refering to the Example Database above, which row/s would be selected if the following MySQL Query was executed:

mysql_query(“SELECT * FROM contacts
WHERE (age > ’26’ OR age < 26) AND firstName='Robert'");

Row 3
Row 0 & Row 3
Row 0 & Row 3 & Row 4
All of the above

5. Refering to the Example Database above, which row/s would be selected if the following MySQL Query was executed:

mysql_query(“SELECT * FROM contacts
WHERE (age > ’26’ OR age < 26) AND firstName='Jeff'");

Row 3
Row 0 & Row 2
Row 1 & Row 2 & Row 4
None of the above

Comment Form

You must be logged in to post a comment.

Users Online

Users Online: 3 Users

Most Users Ever Online: 91

Quiz Scores

Advertisments