 EXEC P_ALTERPK 'PK_T_FA_INTEREST_DETAIL', 'T_FA_INTEREST_DETAIL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_INTEREST_DETAIL') CREATE INDEX IDX_FA_INTEREST_DETAIL ON T_FA_INTEREST_DETAIL ( FLEASECONTRACTID );


 EXEC P_ALTERPK 'PK_T_FA_INTEREST_DETAIL_E', 'T_FA_INTEREST_DETAIL_E', 'FENTRYID', '1';

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