Chapter 21. Creating and Manipulating Tables

In this chapter you’ll learn the basics of table creation, alteration, and deletion.

Creating Tables

MySQL statements are not used just for table data manipulation. Indeed, MySQL can be used to perform all database and table operations, including the creation and manipulation of tables themselves.

There are generally two ways to create database tables:

  • Using an administration tool (like the ones discussed in Chapter 2, “Introducing MySQL”) that can be used to create and manage database tables interactively.

  • Tables may also be manipulated directly with MySQL statements.

To create tables programmatically, the CREATE TABLE SQL statement is used. It is worth noting that when you use interactive tools, you are ...

Get MySQL® Crash Course now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.