Day 6. Manipulating a Database

Today you will learn how to manipulate a database and its tables in MySQL. In particular, you will learn:

  • How to create a database

  • How to drop (delete) a database

  • How to create tables, declaring the names of columns and their data types

  • How to drop (delete) tables

  • How to describe a table

  • How to alter the columns and indexes of a table

An important tool for doing these tasks is the mysql program, which you first saw in Day 2, “Installing MySQL.” Before studying how to work with databases and tables, you will learn how to use mysql to run SQL queries, both in interactive and batch modes.

You will also see more of the versatile mysqladmin program and be introduced to mysqlshow.

Note

In today's lesson, you will see examples ...

Get Sams Teach Yourself MySQL in 21 Days, Second 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.