duanhuang1699 2009-09-24 00:03
浏览 1343
已采纳

mysql:如何将表中的2个字段相加并将结果放在第3个字段中?

lets say our table has the following structure

        col1 | col2 | col3

I want to sum col1 and col2 then update the col3 with the result

Thanks

  • 写回答

1条回答 默认 最新

  • duanlinjian5819 2009-09-24 00:05
    关注
    UPDATE tablename SET col3 = col1 + col2
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?