Is there a way to convert a column from not null to null without dropping the table or column and recreating it?
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.
Rate this page:
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.