ManuGenard
IS-IT--Management
Hi,
Is there a way in Oracle to create a table with some of the columns automatically populated.
Let's say I have 3 amount columns and I want to the third to be the total of the 2 previous one.
I know I can use a trigger to do that, but my question is, is there a way to have that directly included in the table DDL just as in DB2 for example:
create table myTable (col1 integer, col2 integer, col3 GENERATED ALWAYS AS (col1+col2))
Anyone knows ??
Is there a way in Oracle to create a table with some of the columns automatically populated.
Let's say I have 3 amount columns and I want to the third to be the total of the 2 previous one.
I know I can use a trigger to do that, but my question is, is there a way to have that directly included in the table DDL just as in DB2 for example:
create table myTable (col1 integer, col2 integer, col3 GENERATED ALWAYS AS (col1+col2))
Anyone knows ??