ALTER TABLE RDS.T_EXPORT_FRLLO_NEEDS_ELEMENT ADD "mkb" varchar(10) NULL;

update RDS.T_EXPORT_FRLLO_NEEDS_ELEMENT e
set Mkb = ehr.MKB_CODE
from EHR.T_EHR_RUS_MKB308 ehr 
where ehr.EhrRusID = e.EhrRusMkb308;

ALTER TABLE RDS.T_EXPORT_FRLLO_NEEDS_ELEMENT DROP CONSTRAINT FK_T_EHR_RUS_MKB308_T_EXPORT_FRLLO_NEEDS_ELEMENT_EhrRusMkb308;

ALTER TABLE RDS.T_EXPORT_FRLLO_NEEDS_ELEMENT DROP COLUMN "ehrrusmkb308";

