Goal:
My goal is to create a new column called paymentPrice
which is the sum of receiptPrice
, platformFee
, delivererFee
(which needs to display the sum of the current values).
From reading the docs I thought using a generated column would be thebest way to achieve this.
Syntax:
ALTER TABLE
"orders"
ADD
"paymentPrice" FLOAT GENERATED ALWAYS AS (orders."receiptPrice" + orders."platformFee" + orders."delivererFee") VIRTUAL;'
Error:
My current syntax results in the following error, but I can't figure out what I'm doing wrong
error: syntax error at or near "("