Chapter 15. Advanced SQL
The SQL shown in Chapter 5 was sufficient for the scripts in earlier chapters and for the winestore application that's described in the next five chapters. However, SQL is extremely powerful and provides many other capabilities, some of which we'll cover in this chapter. Examples of these useful features include advanced join types, nested queries, and aliases.
Many of the features shown in this chapter are specific to MySQL's version of SQL. For example, MySQL's functions are useful tools for working with strings, dates and times, and math. Also, we'll show some ways to tune MySQL in order to improve application performance. It's important to know how to choose and design indexes for fast querying, and how to use MySQL's query cache for fast results.
We cover the following topics in this chapter:
Exploring your database, tables, indexes, and performance with
SHOWMore on
SELECTqueries, including advanced join types, aliases, nested queries, user variables, and the limitations of MySQLMore on manipulating data and databases, including finding out about tables and databases, creating tables with queries, altering tables, more on the
UPDATEandDELETEstatements, and bulk loading and exporting dataFunctions and operators in SQL and MySQL
Automatically running queries
MyISAM, InnoDB, and Heap table types
Backup and recovery, and transferring data between database servers
Managing database server users and privileges, and creating users for web database applications ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access