13.2. SQL: Defining Tables

Creating Tables

The population of a base tableresides in the database (unlike result tables and views, which we’ll look at shortly). Base tables must be created before they are populated. In SQL-92 onward, base tables (and other aspects of the database) are defined within the scope of a database schemathat is created using a create schema statement. The schema may be deleted using a drop schema statement. Commercial SQLs often provide a different syntax for creating a new database (e.g., create database).

In the SQL standard, tables are created using a create table statement. In addition to this, most DBMSs provide a graphical interface for users to create tables by entering text and selecting options. The main part ...

Get Information Modeling and Relational Databases, 2nd 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.