How can I fill the null values with the values up these nulls

后端 未结 2 1211
抹茶落季
抹茶落季 2021-01-26 13:29

How can I fill the null values with the values below these null values?

Example, I have a table like this:

Mat   Name
123   Jerry
Null  Mary
Null  Sam
45         


        
2条回答
  •  無奈伤痛
    2021-01-26 13:47

    I think you mean

    select name, max(value) OVER(ORDER BY name ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as value
    

提交回复
热议问题