Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Data definition language, also known as DDL, contains commands that define a database’s attributes. Most commonly, DDL creates, alters, and drops tables, indexes, constraints, views, users, and permissions.
In this section you investigate a few of the more common uses for DDL in beginning database programming:
• Creating tables
• Altering tables
• DROP statements
Creating tables in DDL involves using the CREATE TABLE statement. With the CREATE TABLE statement, you can define and create a table, its columns, column data types, and any constraints that might be needed on one or more columns. In its simplest form, the CREATE TABLE syntax and format is shown here.
CREATE TABLE TableName
(FieldName FieldType,
FieldName FieldType,
FieldName FieldType);