5. Introduction to SQL

In This Chapter

Creating Databases and Tables 130

Inserting Records 133

Selecting Data 138

Using Conditionals 140

Using LIKE and NOT LIKE 143

Sorting Query Results 145

Limiting Query Results 147

Updating Data 149

Deleting Data 151

Using Functions 153

Review and Pursue 164

The preceding chapter provides a quick introduction to MySQL. The focus there is on two topics: using MySQL’s rules and data types to define a database, and how to interact with the MySQL server. This chapter moves on to the lingua franca of databases: SQL.

SQL, short for Structured Query Language, is a group of special words used exclusively for interacting with databases. SQL is surprisingly easy to learn and use, and yet, amazingly powerful. In fact, ...

Get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fourth 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.