Day 9. Creating and Maintaining Tables

Today you will learn about creating databases. Today covers the CREATE DATABASE, CREATE TABLE, ALTER TABLE, DROP TABLE, and DROP DATABASE statements, which are collectively known as data definition statements. (In contrast, the SELECT, UPDATE, INSERT, and DELETE statements are often described as data manipulation statements.) By the end of the day, you will understand and be able to do the following:

  • Create key fields.

  • Create a database with its associated tables.

  • Create, alter, and drop a table.

  • Add data to the database.

  • Modify the data in a database.

  • Drop databases.

You now know much of the SQL vocabulary and have examined the SQL query in some detail, beginning with its basic syntax. On Day 2, “Introducing ...

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