EXEC P_ALTERPK 'PK_MSPLAN_REQUIRETYPE', 'T_MSPLAN_REQUIRETYPE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REQUPE_FNUMBER') CREATE INDEX IDX_MSPLAN_REQUPE_FNUMBER ON T_MSPLAN_REQUIRETYPE ( FNUMBER );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REQUPE_FCREATETIME') CREATE INDEX IDX_MSPLAN_REQUPE_FCREATETIME ON T_MSPLAN_REQUIRETYPE ( FCREATETIME );


 EXEC P_ALTERPK 'PK_MSPLAN_REQUIRETYPE_L', 'T_MSPLAN_REQUIRETYPE_L', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REQUPEL_FID') CREATE INDEX IDX_MSPLAN_REQUPEL_FID ON T_MSPLAN_REQUIRETYPE_L ( FID,FLOCALEID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REQUPEL_FNAME') CREATE INDEX IDX_MSPLAN_REQUPEL_FNAME ON T_MSPLAN_REQUIRETYPE_L ( FNAME );

