 EXEC P_ALTERPK 'PK_FMM_PLANTYPE', 'T_FMM_PLANTYPE', 'FID', '1'; 
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PLANTYPE_FNM') CREATE INDEX IDX_FMM_PLANTYPE_FNM ON T_FMM_PLANTYPE ( FNUMBER );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PLANTYPE_FCTID') CREATE INDEX IDX_FMM_PLANTYPE_FCTID ON T_FMM_PLANTYPE ( FCREATEORGID );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PLANTYPE_FCT') CREATE INDEX IDX_FMM_PLANTYPE_FCT ON T_FMM_PLANTYPE ( FCREATETIME );
 
 
 EXEC P_ALTERPK 'PK_FMM_PLANTYPE_L', 'T_FMM_PLANTYPE_L', 'FPKID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PLANTYPE_L') CREATE INDEX IDX_FMM_PLANTYPE_L  ON T_FMM_PLANTYPE_L ( FID ,FLOCALEID );