Specifications

Dropping Tables
At times you may want to get rid of an entire table. You can do this with the DROP TABLE state-
ment. This is very simple, and it looks like this:
DROP TABLE table;
This will delete all the rows in the table and the table itself, so be careful using it.
Dropping a Whole Database
You can go even further and eliminate an entire database with the DROP DATABASE statement,
which looks like this:
DROP DATABASE database;
This will delete all the rows, all the tables, all the indexes, and the database itself, so it goes
without saying that you should be somewhat careful using this statement.
Further Reading
In this chapter, we have given an overview of the day-to-day SQL you will use when interact-
ing with a MySQL database. In the next two chapters, we will look at how to connect MySQL
and PHP so that you can access your database from the Web. Well also explore some
advanced MySQL techniques.
If you want to know more about SQL, you can always fall back on the ANSI SQL standard for
a little light reading. Its available from
http://www.ansi.org/
For more detail on the MySQL extensions to ANSI SQL, you can look at the MySQL Web
site:
http://www.mysql.com
Next
In Chapter 10, Accessing Your MySQL Database from the Web with PHP, well cover how
you can make the Book-O-Rama database available over the Web.
Using MySQL
P
ART II
226
12 7842 CH09 3/6/01 3:36 PM Page 226