DB2 operation:
db2 "create table emp(id int,name char(10),salary int,rev_salary integer
generated always as (salary*50/100))"
[db2inst2(at)db2 ~]$ db2 "insert into emp(id,name,salary)
values(100,'asdf',51100)"
[db2inst2(at)db2 ~]$ db2 "select * from emp"
ID NAME SALARY REV_SALARY
----------- ---------- ----------- -----------
100 asdf 500 250
100 asdf 6600 3300
100 asdf 51100 25550
*How to use postgresql implement?*
Thank you!
--
View this message in context: http://postgresql.nabble.com/How-to-use-postgresql-generated-generated-always-COLUMN-tp5936872.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.