
 EXEC P_ALTERPK 'PK_FMM_PERSWORKTYPE', 'T_FMM_PERSWORKTYPE', 'FID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PERSWORKTYPE_FNUM') CREATE INDEX IDX_FMM_PERSWORKTYPE_FNUM ON T_FMM_PERSWORKTYPE (FNUMBER);
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PERSWORKTYPE_FCT') CREATE INDEX IDX_FMM_PERSWORKTYPE_FCT ON T_FMM_PERSWORKTYPE (FCREATETIME);
 

 EXEC P_ALTERPK 'PK_FMM_PERSWORKTYPE_L', 'T_FMM_PERSWORKTYPE_L', 'FPKID', '1'; 
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PERSPEL_FID') CREATE INDEX IDX_FMM_PERSPEL_FID ON T_FMM_PERSWORKTYPE_L (FID,FLOCALEID );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PERSPEL_FNAME') CREATE INDEX IDX_FMM_PERSPEL_FNAME ON T_FMM_PERSWORKTYPE_L (FNAME);

