34,590
社区成员
发帖
与我相关
我的任务
分享
select id,name,case when proname = 'N/A' then (select top 1 proname from test where id<a.id order by id desc)
else proname end as proname,address
from test a
如果是要修改原来的记录,则改成
update a set proname = (select top 1 proname from test where id<a.id order by id desc)
from test a
where proname = 'N/A'