Chapter 24. Changing and Dropping Tables
24.1 Introduction
The UPDATE
, INSERT
, and DELETE
statements are used to update the contents of a table. In MySQL, we can also change the structure of a table, even when that table contains millions of rows. We can add columns, change the data type of an existing column, add integrity constraints, and even delete entire tables. This chapter describes all the features for dropping tables (with the DROP TABLE
statement), renaming them (with the RENAME
statement), and changing them (with the ALTER TABLE
statement).
Note
Most examples in this book assume that each table contains its original contents. If you ...
Get SQL for MySQL Developers: A Comprehensive Tutorial and Reference 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.