Chapter 3

Tables

Abstract

A discussion of the types of tables and how to design the columns.

Keywords

CREATE TABLE

TEMPORARY

LOCAL

GLOBAL

ON COMMIT clause

default clause

column constraint

NOT NULL

Data types

CHECK() constraints

UNIQUE and PRIMARY KEY constraints

REFERENCES clause

Computed column

DEFERRABLE constraints

CREATE DOMAIN statement

CREATE SEQUENCE statement

Character sets

Unicode

CREATE TRANSLATION

Conceptually, a table is a set of zero or more rows, and a row is a set of one or more columns. This hierarchy is important; actions apply at either the schema level, table level, row level, or column level. For example, the DELETE FROM statement removes whole rows, not columns, and leaves the base table in the schema. You cannot delete ...

Get Joe Celko's SQL for Smarties, 5th 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.