I want to add two columns in MySql workbench? -
my table name 'bills' want sum of columns electricity , gas , sum should automatically stored in column named total.which trigger can work please tell me correct code.i have searched lot didn't got answer.
electricity+gas=total 1 2 3
sorry, if herrsekurr correct , homework, it's trick question.
tell teacher: "teacher, 1 should never store derived result table. beauty , power in sql ability generate desired query current data."
to so: "select electricity, gas, sum(electricity + gas) your_table"
now, if want index (maybe that's database term meant), accept answer, ask new question...
Comments
Post a Comment