且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更新具有特定条件的表中值为null的列中的值

更新时间:2022-12-10 13:53:19

似乎没有真实情况。这些值没有按特定顺序显示,现在您只需将最后一个非空值分配给任何空值,直到下一个非空值。



顺便说一下,如果name是唯一没有任何其他列或索引的列,那么实际上不需要复制值。单个A和B就足够了。其他行没有任何意义,可以删除。



祝你好运!
There doesn't seem to be a real condition. The values are presented in no particular order and now you just assign the last non null value to any null value up until the next non null value.

By the way, if name is the only column without any other columns or index there really isn't any need to duplicate the values. A single A and B is enough. The other rows simply have no meaning and can be removed.

Good luck!