
 EXEC P_ALTERPK 'PK_BD_REQUIRETYPE', 'T_BD_REQUIRETYPE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_REQUIRETYPE_NU') CREATE INDEX IDX_BD_REQUIRETYPE_NU ON T_BD_REQUIRETYPE ( FNUMBER );


 EXEC P_ALTERPK 'PK_BD_REQUIRETYPE_INV', 'T_BD_REQUIRETYPE_INV', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_REQUIRETYPE_INV_ID') CREATE INDEX IDX_BD_REQUIRETYPE_INV_ID ON T_BD_REQUIRETYPE_INV ( FID );


 EXEC P_ALTERPK 'PK_BD_REQUIRETYPE_L', 'T_BD_REQUIRETYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_REQUIRETYPE_L_ID') CREATE INDEX IDX_BD_REQUIRETYPE_L_ID ON T_BD_REQUIRETYPE_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_BD_REQUIRETYPE_RANGE', 'T_BD_REQUIRETYPE_RANGE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_REQUIRETYPE_RANGE_ID') CREATE INDEX IDX_BD_REQUIRETYPE_RANGE_ID ON T_BD_REQUIRETYPE_RANGE ( FID );


 EXEC P_ALTERPK 'PK_BD_REQUIRETYPE_WAY', 'T_BD_REQUIRETYPE_WAY', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_REQUIRETYPE_WAY_ID') CREATE INDEX IDX_BD_REQUIRETYPE_WAY_ID ON T_BD_REQUIRETYPE_WAY ( FID );
