ALTER TABLE `tblcontacts` ADD `phonenumber_code` VARCHAR(6) CHARACTER SET utf8 COLLATE utf8_general_ci NULL  AFTER `phonenumber`;

ALTER TABLE `tblclients` ADD `phonenumber_code` VARCHAR(6) CHARACTER SET utf8 COLLATE utf8_general_ci NULL  AFTER `phonenumber`;

UPDATE `tblcontacts` a JOIN `tbltenants` b on a.tenant_id = b.id set a.phonenumber_code = b.mobile_no_code where b.id = a.tenant_id;

UPDATE `tblclients` a JOIN `tbltenants` b on a.tenant_id = b.id set a.phonenumber_code = b.mobile_no_code where b.id = a.tenant_id;