Create a new table by using the CREATE TABLE statement in the Data Definition Language (DDL)
Access creates the database tables in a variety of ways:
- Create a table in Design view
- Create a table using a wizard
- Create a table by entering data
Or using the functions:
But in some cases it is useful to be able to create tables with DDL statements, such as CREATE TABLE. Using the CREATE TABLE statement, you can define a new table and its fields and field constraints. The following example shows how to create a Customers table.
CREATE TABLE Customers
(
ID integer primary key,
Company varchar(50),
Name varchar(50),
Surname varchar(50),
Title varchar(30),
Address varchar(60),
City varchar(20),
PostalCode varchar(15),
Country varchar(15),
Phone varchar(25),
Email varchar(60)
)