EXEC P_ALTERPK 'PK_BD_WBS', 'T_BD_WBS', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_WBS_FNUMBER')  CREATE INDEX IDX_BD_WBS_FNUMBER ON T_BD_WBS ( FNUMBER);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_WBS_FCREATEORGID')  CREATE INDEX IDX_BD_WBS_FCREATEORGID ON T_BD_WBS ( FCREATEORGID);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_WBS_FCREATETIME')  CREATE INDEX IDX_BD_WBS_FCREATETIME ON T_BD_WBS ( FCREATETIME);

EXEC P_ALTERPK 'PK_BD_WBS_L', 'T_BD_WBS_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDXS_BD_WBS_L_FID')  CREATE INDEX IDXS_BD_WBS_L_FID ON T_BD_WBS_L ( FID, FLOCALEID);



EXEC P_ALTERPK 'PK_BD_PROJECTPARAM', 'T_BD_PROJECTPARAM', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_PROJECTPARAM_FNUM')  CREATE INDEX IDX_BD_PROJECTPARAM_FNUM ON T_BD_PROJECTPARAM ( FNUMBER);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_PROJECTPARAM_FCRE')  CREATE INDEX IDX_BD_PROJECTPARAM_FCRE ON T_BD_PROJECTPARAM ( FCREATEORGID);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_PROJECTPARAM_FCRE')  CREATE INDEX IDX_BD_PROJECTPARAM_FCRE ON T_BD_PROJECTPARAM ( FCREATETIME);

EXEC P_ALTERPK 'PK_BD_PROJECTPARAM_L', 'T_BD_PROJECTPARAM_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDXS_BD_PROJECTPARAM_L_FID')  CREATE INDEX IDXS_BD_PROJECTPARAM_L_FID ON T_BD_PROJECTPARAM_L ( FID, FLOCALEID);