How to add a column with computed columns with values of row on Sybase IQ [closed]
-
02-11-2019 - |
Question
How to add a computed column to a table referring a field from current row at Sybase IQ 16
Here is want I want to achieve: When inserting a new row (or updating a row) I want to have a column updated based on a function referencing another field. To make an example
I've got this table:
CREATE TABLE "myTable" (
id integer,
sales integer,
bonus integer
)
Where bonus should be calculated as sales * 10 -- remember, just an example.
I was thinking about adding some trigger functions doing this, but then I found computed columns -- unfortunately wasn't able to get this running.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange