DB2 graphic  QMF Version 8

ADD

You can add columns to a table only if you created the table or are specifically authorized to do so. The following example adds one column to the description of table PERS:

ALTER TABLE PERS
ADD PHONENO SMALLINT

The new column is initially filled with null values. Use the UPDATE statement to provide actual values for the new column.

In DB2 UDB, you can define a column as NOT NULL WITH DEFAULT, but you cannot define an added column to be NOT NULL.

NOT NULL WITH DEFAULT is invalid in DB2 Server for VSE or VM.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004