EXEC P_ALTERPK 'PK_PMTS_WBSMTYPE', 'T_PMTS_WBSMTYPE', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBSMPE_FNUMBER') CREATE INDEX IDX_PMTS_WBSMPE_FNUMBER ON T_PMTS_WBSMTYPE (FNUMBER ASC);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBSMPE_FCREATETIME') CREATE INDEX IDX_PMTS_WBSMPE_FCREATETIME ON T_PMTS_WBSMTYPE (FCREATETIME ASC);


EXEC P_ALTERPK 'PK_PMTS_WBSMTYPE_L', 'T_PMTS_WBSMTYPE_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBSMPEL_FID') CREATE INDEX IDX_PMTS_WBSMPEL_FID ON T_PMTS_WBSMTYPE_L (FID,FLOCALEID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_WBSMPEL_FNAME') CREATE INDEX IDX_PMTS_WBSMPEL_FNAME ON T_PMTS_WBSMTYPE_L (FNAME ASC);