IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_FREEFORMCFG') 
 CREATE TABLE T_LIC_FREEFORMCFG (
FID BIGINT DEFAULT 0 NOT NULL,
FFORMID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME
);

 EXEC P_ALTERPK 'PK_T_LIC_FREEFORMCFG', 'T_LIC_FREEFORMCFG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_LIC_FREEFORMCFG_FORMID') CREATE INDEX IX_LIC_FREEFORMCFG_FORMID ON T_LIC_FREEFORMCFG ( FFORMID );