/* 基础资料字段引用关系实体id和引用实体id更新  */

UPDATE T_META_OBJECTTYPEREF A
	    SET FENTITYID = (SELECT FID FROM T_META_ENTITYDESIGN WHERE FNUMBER = A.FOBJECTTYPEID)
	 WHERE EXISTS (SELECT 1 FROM T_META_ENTITYDESIGN WHERE FNUMBER = A.FOBJECTTYPEID);

UPDATE T_META_OBJECTTYPEREF A
	    SET FREFENTITYID = (SELECT FID FROM T_META_ENTITYDESIGN WHERE FNUMBER = A.FREFOBJECTTYPEID)
	 WHERE EXISTS (SELECT 1 FROM T_META_ENTITYDESIGN WHERE FNUMBER = A.FREFOBJECTTYPEID);