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 ...
Get Sams Teach Yourself SQL in One Hour a Day, Fifth 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.