CREATE TABLE examples
The following example creates a DBF table called SALES with the following structure:
Field name |
Field type |
Field length |
Decimal places |
SALESID |
Character |
6 |
|
CUSTOMERID |
Character |
10 |
|
ORDERDATE |
Date |
8 |
|
ORDERNMBR |
Numeric |
7 |
0 |
ORDERAMT |
Numeric |
9 |
2 |
DELIVERED |
Logical |
1 |
|
CREATE TABLE SALES (;
SALESID CHAR(6), ;
CUSTOMERID CHAR(10), ;
ORDERDATE DATE, ;
ORDERNMBR NUMERIC(7,0), ;
ORDERAMT NUMERIC(9,2), ;
DELIVERED BOOLEAN)
The following statement creates a Paradox table with a PRIMARY KEY constraint on the LAST_NAME and FIRST_NAME columns:
CREATE TABLE "employee.db" (;
LAST_NAME CHAR(20), ;
FIRST_NAME CHAR(15), ;
SALARY NUMERIC(10,2), ;
DEPT_NO SMALLINT, ;
PRIMARY KEY(LAST_NAME, FIRST_NAME))