CREATE TEMP TABLE temp_dnitem_mkb
(
    DnitemID UUID,
    DS_DISP VARCHAR(20) NOT NULL
);

INSERT INTO temp_dnitem_mkb (DnitemID, DS_DISP)
SELECT pb.DnitemID,
       mkb.MCBCode
FROM RDS.T_DN_item pb
JOIN RDS.T_MKB mkb ON mkb.MkbID = pb.DS_DISP;

ALTER TABLE RDS.T_DN_item
    DROP CONSTRAINT FK_T_MKB_T_DN_ITEM_DS_DISP;

ALTER TABLE RDS.T_DN_item
    DROP COLUMN DS_DISP;

ALTER TABLE RDS.T_DN_item ADD COLUMN DS_DISP VARCHAR(20);

UPDATE RDS.T_DN_item pb
SET DS_DISP = tmp.DS_DISP
FROM temp_dnitem_mkb tmp
WHERE tmp.DnitemID = pb.DnitemID;

DROP TABLE temp_dnitem_mkb;
