create table myTable (int i, int user_id, int a, int b, int c)
值是这样的。
1, 1, 1, 1, 0
2, 1, 2, 2, 0
3, 2, 3, 3, 0
4, 2, 4, 4, 0
对于 user_id = 1,我希望将“c”列更新为“a”+“b”。我应该怎么做?
最佳答案
关于mysql - 如何根据现有列计算列值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22929684/