Chapter 15. Creating Tables

Introduction

This chapter describes the statements for creating, updating, and deleting tables. We take the view that the user knows what data must be stored and what the structure of the data is—that is, what tables are to be created and what the appropriate columns are. In other words, the user has a ready-to-use database design at his or her disposal. The topic of database design is covered in Chapter 19, “Designing Tables.”

Creating New Tables

The CREATE TABLE statement is used to construct new tables, in which rows of data can be stored. The definition of this statement is complex and extensive. For that reason, we explain the statement’s features step by step and build up the definition slowly. The concepts of column ...

Get Introduction to SQL: Mastering the Relational Database Language, Fourth Edition/20th Anniversary 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.