IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CUSTOM_PARAM')
CREATE TABLE T_EB_CUSTOM_PARAM
(
    FID               BIGINT          DEFAULT 0   NOT NULL,
    FBILLID           BIGINT          DEFAULT 0   NOT NULL,
    FPARAMJSON 		  NVARCHAR(2000)  DEFAULT ' ' NOT NULL
);
EXEC P_ALTERPK 'PK_T_EB_CUSTOM_PARAM', 'T_EB_CUSTOM_PARAM', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CUSTOM_PARAM')
CREATE INDEX IDX_EB_CUSTOM_PARAM ON T_EB_CUSTOM_PARAM (FBILLID ASC);