how to do sum of two columns and store in another column in database

Hai friends.......

My question is I have one table in that three columns a, b and c..

a=7 and b=10 given input now c value must be store as a+b means 7+10=17.

Please can anybody tell me solution...

Tahnk you.........

Don't do it, there is no need as you can work it out whenever you need
it. So do not have a column c in the database, just provide method c
in the model:
def c
  a+b
end

Then you can use your_object.c just as if it were a column in the db.

Colin