Computed Columns

From InterBase
Jump to: navigation, search

Image 025.jpgComputed Columns

When you are creating a table, you can define columns whose value is based on the values of one or more other columns in the table. The computation can include any arithmetic operations that are appropriate to the datatypes of the columns.

  • Open the script Tables.sql and look at the following column definition for the Employee table:

full_name COMPUTED BY (last_name || ', ' || first_name)

The value of the full-name column consists of the value in the same row of the last_name column plus a comma plus the value of the first_name column

Advance To:

Backing Up a Database