Jump to content

Create (SQL)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Arcann (talk | contribs) at 21:28, 8 April 2005 (Add reference to creating indexes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A CREATE statement in SQL creates an object inside of a relational database management system (RDBMS). The types of objects that can be created depends on which RDBMS is being used, but most support the creation tables, indexes, users, and databases. Some systems (such as PostgreSQL) allow CREATE and other DDL comands to occur inside of a transaction and thus be rolled back.

The typical usage is CREATE objecttype objectname parameters. For example, the command to create a table named employees with a single column would be:

CREATE TABLE employees (id INTEGER);