Summary

In today's lesson, you learned a good deal about writing queries for MySQL.

The central theme was the SELECT query, the principal tool for getting data out of your database in the form of a resultset. You learned how to construct a WHERE clause, and how to include operators and functions within various parts of the query.

You saw how to sort and group the resultset using ORDER BY and GROUP BY, and how to limit the number of rows returned using LIMIT. All this is fundamental to your SQL skillset, as is the application of the DELETE query for deleting data, which uses the WHERE, LIMIT, and ORDER BY clauses just like SELECT does.

You also covered some more advanced topics, such as the HAVING clause for doing last-minute processing on the ...

Get Sams Teach Yourself MySQL in 21 Days, Second 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.