PostgreSQL, sum data from row of table? -
xabcd ---------- A 1 2 3 4B5 6 7 8C6 7 8 9I want my sum to A = 1 + 2 + 3 + 4 and B and C, is there any command which can add a line of data to PostgreSQL?
There is no such built-in function, but you can just do the following: < Pre>
select x, assuming that the data type of
a ,
b ,
c and
d are numerical.
Comments
Post a Comment