The current existing table looks like this:
id number amount
1 123 30000.00
2 123 15000.00
3 321 45000.00
... ...
Virtual Column:
alter table Table1
add allocated_amount integer GENERATED ALWAYS AS (amount) VIRTUAL;
It is not possible as default column. You can write a trigger and do that or add virtual column in Mysql 5.7.
OR
alter table Tab1 add allocated_amount int; -- Add column
update Tab1 set allocated_amount= amount; -- Set the value
Or you could create a Virtual Column:
alter table Table1
add allocated_amount integer GENERATED ALWAYS AS (amount) VIRTUAL;