ALTER TABLE REPRESLEGAL MODIFY CDBAIRRO NULL
/
ALTER TABLE REPRESLEGAL ADD NMBAIRRO VARCHAR2(50) 
/
UPDATE REPRESLEGAL R
   SET NMBAIRRO = (SELECT NMBAIRRO FROM BAIRRO WHERE CDPAIS= R.CDPAIS AND SGESTADO=R.SGESTADO AND CDMUNICIPIO =R.CDMUNICIPIO AND CDBAIRRO= R.CDBAIRRO)
 WHERE NMBAIRRO IS NULL  
/