错两行
select lag(name,-2,'乱七八糟的空替换字符串') over(order by id) as las,* from sgdd
错行更新当前字段的值
update sgdd set name=z.las from(select lag(name,-2,'乱七八糟的空替换字符串') over(order by id) as las,* from sgdd) z where z.id=sgdd.id
这个语句之宝贵啊
我搜了好久才回忆起来
标签:PGSQL,错行,over,name,上下行,sgdd,id,select,las From: https://blog.51cto.com/u_14650780/5998684