Spanish Total.js
English
Documentation For AI agents
Contents

Calculated columns

Show a value calculated by PostgreSQL from other columns with the SQL column type.

.md Website
On this page

A column of the type SQL shows a value that PostgreSQL calculates from the other columns of the record. It is read-only and is not stored; it is calculated each time the records are read.

Add a calculated column

1. Open the settings of the table and click Add in the Columns tab.

2. Choose the type SQL.

3. Enter the Name, for example Stock value.

4. In SQL expression, write the calculation. Refer to the other columns with the col. alias and their IDs:

col.x02 * col.x03

5. Click SUBMIT in both forms.

In a Products table where x02 is the price and x03 is the number in stock, this column shows the value of the stock of each product.

Any expression that PostgreSQL accepts in a SELECT works, for example UPPER(col.x01) or COALESCE(col.x04, 0) * 1.21.

Made in Europe