6.Querying MySQL
So far, we have covered designing, creating, and populating a MySQL database. In this chapter and the two that follow it, we will look at the other end of this process: retrieving data from your database.
In this chapter, we will cover the SQL SELECT
statement in some detail. This is probably the most important statement in SQL. It is the statement we use to select rows from one or more database table(s).
In this chapter, we will discuss how to select rows from a single database table. We'll cover the following:
• Overview of SELECT
• Simple queries
• Selecting particular columns
• Column aliases
• Using the WHERE
clause to select particular rows
• Using the GROUP BY
clause
• Selecting particular groups with HAVING
Get MySQL Tutorial 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.