Use the Column dialog to add a column to an existing table or modify a column definition.
The Column dialog organizes the development of a column through the following dialog tabs: General, Definition, and Security. The SQL tab displays the SQL code generated by dialog selections.
Use the fields in the General tab to identify the column:
Click the Definition tab to continue.
Use the fields in the Definition tab to add parameters for the column. (Fields are disabled if inapplicable.)
Click the Variables tab to continue.
Use the Variables tab to to specify the number of distinct values that may be present in the column; this value overrides estimates made by the ANALYZE command. Click the Add icon (+) to add a Name/Value pair:
Select the name of the variable from the drop-down listbox in the Name field.
- Select n_distinct to specify the number of distinct values for the column.
- Select n_distinct_inherited to specify the number of distinct values for the table and its children.
Specify the number of distinct values in the Value field. For more information, see the documentation for ALTER TABLE.
Click the Add icon (+) to specify each additional Name/Value pair; to discard a variable, click the trash icon to the left of the row and confirm deletion in the Delete Row popup.
Click the Security tab to continue.
Use the Security tab to assign attributes and define security labels. Click the Add icon (+) to add each security label selection:
Click the Add icon (+) to assign additional security labels; to discard a security label, click the trash icon to the left of the row and confirm deletion in the Delete Row popup.
Click the SQL tab to continue.
Your entries in the Column dialog generate a SQL command (see an example below). Use the SQL tab for review; revisit or switch tabs to make any changes to the SQL command.
Example
The following is an example of the sql command generated by user selections in the Column dialog:
The example shown demonstrates creating a column named territory in the table named distributors.