18

Maintaining Tables

Keywords Introduced

CREATE TABLE • DROP TABLE • CREATE INDEX • DROP INDEX

With this chapter, we change our focus from data retrieval and modification to design. Up until now, we’ve assumed that tables simply exist and are available to any interested user. However, in the normal course of events, someone must create tables before their data can be accessed. We therefore turn to the question of how to create and maintain tables.

Previously, we touched on a few of the topics we’ll address now, such as primary and foreign keys, but now we want to delve into these areas in greater detail and address the related topic of table indexes.

Data Definition Language

Back in Chapter 1, we mentioned the three main components of the ...

Get The Language of SQL, 3rd 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.