按照描述这么写:update 表名 t1set t1.name=(select name from 表名 t2where t2.pid=t1.pid and t2.name is not null and rownum=1)where t1.name is null;