/**Begin D:\page\rim\pdm\20210723\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_RIM_DOWN_ACCOUNT', 'T_RIM_DOWN_ACCOUNT', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_ACCOUNT') CREATE  CLUSTERED INDEX IDX_RIM_DOWN_ACCOUNT ON T_RIM_DOWN_ACCOUNT ( FBATCH_NO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_ACCOUNT2') CREATE INDEX IDX_RIM_DOWN_ACCOUNT2 ON T_RIM_DOWN_ACCOUNT ( FCREATETIME );


 EXEC P_ALTERPK 'PK_RIM_DOWN_INIT', 'T_RIM_DOWN_INIT', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_INIT') CREATE  CLUSTERED INDEX IDX_RIM_DOWN_INIT ON T_RIM_DOWN_INIT ( FUSESTATE );


 EXEC P_ALTERPK 'PK_RIM_DOWN_INPUT', 'T_RIM_DOWN_INPUT', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_INPUT') CREATE  CLUSTERED INDEX IDX_RIM_DOWN_INPUT ON T_RIM_DOWN_INPUT ( FSERIAL_NO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_INPUT2') CREATE INDEX IDX_RIM_DOWN_INPUT2 ON T_RIM_DOWN_INPUT ( FSYNC_STATUS );


 EXEC P_ALTERPK 'PK_RIM_VERIFY_DETAIL', 'T_RIM_VERIFY_DETAIL', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_VERIFY_DETAIL') CREATE  CLUSTERED INDEX IDX_RIM_VERIFY_DETAIL ON T_RIM_VERIFY_DETAIL ( FID );


 EXEC P_ALTERPK 'PK_RIM_VERIFY_STATISTIC', 'T_RIM_VERIFY_STATISTIC', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_VERIFY_STATISTIC') CREATE  CLUSTERED INDEX IDX_RIM_VERIFY_STATISTIC ON T_RIM_VERIFY_STATISTIC ( FCREATETIME );


 EXEC P_ALTERPK 'PK_RIM_DOWN_LOG', 'T_RIM_DOWN_LOG', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_LOG_BATCH_NO') CREATE  CLUSTERED INDEX IDX_RIM_DOWN_LOG_BATCH_NO ON T_RIM_DOWN_LOG ( FBATCH_NO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_LOG_TAX_NO') CREATE INDEX IDX_RIM_DOWN_LOG_TAX_NO ON T_RIM_DOWN_LOG ( FTAX_NO );



/**End D:\page\rim\pdm\20210723\RIM_constraint.sql **/
