19 The Paradox Driver : Alter Table Statement

Alter Table Statement
The Paradox driver supports the Alter Table statement to add one or more columns to a Paradox database file or to delete (drop) a single column.
The Alter Table statement has the form:
ALTER TABLE filename {ADD column_name data_type
[DEFAULT default_value] | ADD (column_name data_type
[DEFAULT default_value][, column_name data_type
[DEFAULT default_value]] , , ,) | DROP
[COLUMN] column_name [CASCADE | RESTRICT]}
filename is the name of the Paradox database file to which you are adding or dropping columns.
column_name assigns a name to the column you are adding or specifies the column you are dropping.
data_type specifies the native data type of each column you add.
For example, to add two columns to the emp database file:
ALTER TABLE emp (ADD startdate date, dept alphanumeric(10))
Dropping Columns
You cannot add columns and drop columns in a single statement, and you can drop only one column at a time.
When dropping a column, use the Cascade keyword to drop the column while removing references from any dependent objects, such as indexes or views. Use Restrict to cause the Alter Table statement to fail if other objects are dependent upon the column you are dropping. For example, to drop a column and remove its references from dependent objects:
ALTER TABLE emp DROP startdate CASCADE
If the Alter Table statement contains neither Cascade nor Restrict, it fails when you attempt to drop a column upon which other objects are dependent.