Creating a Computed Column

Computed columns are columns whose content is computed from values in other columns in the table. Computed columns are not supported by all DBMSs.

  1. Open the table property sheet and click the Columns tab.
  2. Click the Add a Row tool, and then click the Properties tool to open the property sheet for the new column.
  3. On the General tab, select the Computed checkbox, and then click the Detail tab.

    Simple computed expressions can be entered directly in the Computed expression field. For more complex expressions, click the Edit tool to the right of the field to access the SQL Editor (see Writing SQL Code in PowerDesigner).

    In the following example a column must be filled with the total sales of widgets computed by multiplying the number of widgets by the widget price:



  4. Click OK to return to the column property sheet.

    The expression is displayed in the Computed Expression pane.