IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_MANNUALPAY') 
 CREATE TABLE T_ER_MANNUALPAY (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(60) DEFAULT ' ' NOT NULL,
FSTATUSBEFOREPAY NVARCHAR(5) DEFAULT ' ' NOT NULL,
FFORMID NVARCHAR(30) DEFAULT ' ' NOT NULL
);


 EXEC P_ALTERPK 'PK_T_ER_MANNUALPAY', 'T_ER_MANNUALPAY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_MANNUALPAY') CREATE INDEX IDX_ER_MANNUALPAY ON T_ER_MANNUALPAY ( FBILLNO ,FFORMID );