我当前的表格输出是
---------------------------------------------------
| id col1 col2 |
---------------------------------------------------
| 1 | test1 | 1 |
| 2 | test11 | 0 |
| 3 | test12 | 0 |
| 4 | test13 | 0 |
| 5 | test14 | 0 |
| 6 | test2 | 2 |
| 7 | test21 | 0 |
| 8 | test22 | 0 |
| 9 | test23 | 0 |
| 10 | test24 | 0 |
---------------------------------------------------
预期输出为
---------------------------------------------------
| id col1 col2 |
---------------------------------------------------
| 1 | test1 | 1 |
| 2 | test11 | 1 |
| 3 | test12 | 1 |
| 4 | test13 | 1 |
| 5 | test14 | 1 |
| 6 | test2 | 2 |
| 7 | test21 | 2 |
| 8 | test22 | 2 |
| 9 | test23 | 2 |
| 10 | test24 | 2 |
---------------------------------------------------
没有光标这可能吗?有没有一种方法可以在当前行值为 0 的情况下将顶行值添加到当前行值?