maybe ...
Code:
update xyz x
        set sal = (
           select sal
           from xyz y 
           where y.id!=x.id and y.name = x.name)
where sal is null
/
Might be a little quicker, if id is indexed and sal isn't.