Creates a new table.

Syntax

CREATE TABLE <table name> (<column name> <data type> [,<column name> <data type>...]
[, PRIMARY KEY(<field name>)])

Description

Create a FoxPro, Paradox or dBASE table using local SQL by specifying the file extension when naming the table:

DB for Paradox tables

DBF for FoxPro and dBASE tables

If you omit the file extension for a local table name, the table created is the table type specified in the Default Driver setting in the System page of the BDE Administrator.

CREATE TABLE has the following limitations:

Column definitions based on domains are not supported.

Constraints are limited to PRIMARY KEY. For DBF7 tables, only single-field primary keys are supported through the CREATE TABLE command. (Use the Table Designer or the Xbase INDEX command to create complex primary keys.) Primary keys are not supported for earlier versions of DBF.

At least one <column name> <data type> must be defined. The column definition list must be enclosed in parentheses.

CREATE TABLE is a alternate way of creating a table without using the Table Designer, the Database object’s copyTable( ) method, or an UpdateSet object.