错两行
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 错行,上下行,前后行计算
阅读 61
2023-01-09
错两行
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
这个语句之宝贵啊
我搜了好久才回忆起来
相关推荐
精彩评论(0)