Skip to main content

Changing a column definition


Technote (FAQ)


Question

Is there a way to convert a column from not null to null without dropping the table or column and recreating it?

Answer

PointBase supports ALTER TABLE ALTER COLUMN functionality that allows some aspects of a column definition to be changed. In the case under discussion, a column which has been constrained as NOT NULL can be redefined to allow NULLs. The reverse is not allowed as some rows for the column may already have NULL values and it would be unclear as to what those values should become if the column definition changed to NOT NULL. In addition to changing a column from NOT NULL to NULL, some data types can be redefined to be wider than the existing defined width of the column, and for heap-organized tables the default value for a column can be changed. For full specifics on the use and limitations of ALTER TABLE ALTER COLUMN, please consult the PointBase Embedded documentation.

Historical Number

319

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

PointBase Embedded


Software version:
ALL


Operating system(s):
ALL


Reference #:
1369671


Modified date:
2008-08-21

Translate my page

Content navigation