O'Reilly logo

Sams Teach Yourself SQL in One Hour a Day, Fifth Edition by Arie D. Jones, Ron Plew, Ryan Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

LESSON 9Creating and Maintaining Tables

This lesson 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 this lesson, 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.

• Drop databases.

You now know much of the SQL vocabulary and have examined the SQL query in some detail, beginning with its basic syntax. In Lesson 2, “Introducing the Query,” you learned how to select data from the database. Later in Lesson ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required