错两行
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
这个语句之宝贵啊
我搜了好久才回忆起来
错两行
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
这个语句之宝贵啊
我搜了好久才回忆起来