 EXEC P_ALTERPK 'PK_FMM_QUERYDESIGN', 'T_FMM_QUERYDESIGN', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERGN_FCT') CREATE INDEX IDX_FMM_QUERGN_FCT ON T_FMM_QUERYDESIGN ( FCREATETIME );
 
 
 EXEC P_ALTERPK 'PK_FMM_QUERYDESIGN_L', 'T_FMM_QUERYDESIGN_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERYDESIGN_L') CREATE INDEX IDX_FMM_QUERYDESIGN_L ON T_FMM_QUERYDESIGN_L ( FID,FLOCALEID );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERYDESIGN_L_FNA') CREATE INDEX IDX_FMM_QUERYDESIGN_L_FNA ON T_FMM_QUERYDESIGN_L ( FNAME );
 
 
 EXEC P_ALTERPK 'PK_FMM_QUERYDESIGN_ENT', 'T_FMM_QUERYDESIGN_ENTRY', 'FENTRYID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERYDESIGN_ENTRYSEQ') CREATE INDEX IDX_FMM_QUERYDESIGN_ENTRYSEQ ON T_FMM_QUERYDESIGN_ENTRY ( FID,FSEQ );
 
 
 EXEC P_ALTERPK 'PK_FMM_QUERCARD_SETTING', 'T_FMM_QUERCARD_SETTING', 'FID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERCARD_SETTING_FNUM') CREATE INDEX IDX_FMM_QUERCARD_SETTING_FNUM ON T_FMM_QUERCARD_SETTING ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERCARD_SETTING_FCT') CREATE INDEX IDX_FMM_QUERCARD_SETTING_FCT ON T_FMM_QUERCARD_SETTING ( FCREATETIME );
 
 
 EXEC P_ALTERPK 'PK_FMM_QUERCARD_SETTING_L', 'T_FMM_QUERCARD_SETTING_L', 'FPKID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERCARD_SETTING_L') CREATE INDEX IDX_FMM_QUERCARD_SETTING_L ON T_FMM_QUERCARD_SETTING_L ( FID,FLOCALEID );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QUERCARD_SETTING_L_FNA') CREATE INDEX IDX_FMM_QUERCARD_SETTING_L_FNA ON T_FMM_QUERCARD_SETTING_L ( FNAME );
 
 
 EXEC P_ALTERPK 'PK_FMM_QCS_ENTRY', 'T_FMM_QCS_ENTRY', 'FENTRYID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_QCS_ENTRY_FSEQ') CREATE INDEX IDX_FMM_QCS_ENTRY_FSEQ ON T_FMM_QCS_ENTRY ( FID,FSEQ );
 
 
 EXEC P_ALTERPK 'PK_FMM_PROMONIT_MENUCONF', 'T_FMM_PROMONIT_MENUCONF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROMONIT_MENUCONF_FCD') CREATE INDEX IDX_FMM_PROMONIT_MENUCONF_FCD ON T_FMM_PROMONIT_MENUCONF ( FCREATORID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROMONIT_MENUCONF_FCT') CREATE INDEX IDX_FMM_PROMONIT_MENUCONF_FCT ON T_FMM_PROMONIT_MENUCONF ( FCREATETIME );
 
 
 EXEC P_ALTERPK 'PK_FMM_PROMONIT_MENUS', 'T_FMM_PROMONIT_MENUS', 'FENTRYID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROMONIT_MENUS_FSEQ') CREATE INDEX IDX_FMM_PROMONIT_MENUS_FSEQ ON T_FMM_PROMONIT_MENUS ( FID,FSEQ );