Test Your Knowledge

  1. What is the purpose of the semicolon in MySQL queries?

  2. Which command would you use to view the available databases or tables?

  3. How would you create a new MySQL user on the local host called newuser with a password of newpass and with access to everything in the database newdatabase?

  4. How can you view the structure of a table?

  5. What is the purpose of a MySQL index?

  6. What benefit does a FULLTEXT index provide?

  7. What is a stopword?

  8. Both SELECT DISTINCT and GROUP BY cause the display to show only one output row for each value in a column, even if multiple rows contain that value. What are the main differences between SELECT DISTINCT and GROUP BY?

  9. Using the SELECT...WHERE construct, how would you return only rows containing the word Langhorne somewhere in the author column of the classics table used in this chapter?

  10. What needs to be defined in two tables to make it possible for you to join them together?

See Chapter 8 Answers in Appendix A for the answers to these questions.

Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.