This clause adds a column to the table. It defines a column with the same syntax as the Create Table command (see Column Definition for Remote Tables).ADD [COLUMN] column_nameDatatype ...
[DEFAULT default_value] [[NOT]NULL] [EXT_ID] [PRIMARY KEY]
[START WITH starting_value]Is the default value to be assigned to the column. See Column Definition for Remote Tables for details.
• If NOT NULL is specified and the table is not empty, a default value must be specified. In all other respects, this command is the equivalent of a column definition in a Create Table statement.
• If a SQL view includes SELECT * FROM for the table to which the column was added in the view’s Select statement, the new column is added to the view.Example 1. Example AAssuming the current schema is SFORCE, this example adds the status column with a default value of ACTIVE to the test table.Example 2. Example BAssuming the current schema is SFORCE, this example adds a deptId column that can be used as a foreign key column.
![]() |
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |