UPDATE software SET purchprice = (SELECT purchprice FROM softwarecost WHERE id = software.id) where EXISTS (SELECT purchprice FROM softwarecost WHERE id = software.id)