Fujitsu J2X0-2273-01EN Server User Manual


 
structure, data corresponding to one row in a table may exceed one page after a BLOB-type column is added.
Only NOT NULL can be specified as a constraint for the column to be added. If NOT NULL is specified, the DEFAULT
clause must be specified in the column definition.
DEFAULT values are set for existing data.
A specification example for adding a column definition follows.
Example:
Add a PRICE_SOLD column to the ORDER table. Figure: Adding a column to a table shows the result.
[Figure: Adding a column to a table]
Deleting a column definition
To delete a column from a base table, specify the deletion of a column definition in the ALTER TABLE statement. Only
one column can be deleted by one table alteration statement. A column cannot be deleted if it is referenced by a view
definition. If an index DSO definition for the column exists, the column cannot be deleted. The index DSO definition
must be deleted first. However, if a unique constraint for the column exists, the column cannot be deleted even if the
index DSO definition is deleted. The number of columns in a table cannot be reduced to zero by deleting a column
definition. To delete all columns, use the DROP TABLE definition. A specification example for deleting a column
definition follows.
Example:
Delete the PRICE column from the ORDER table. Figure: Deleting a column from a table shows the
result.
119