IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_WEAVEDESCENTITY') 
CREATE TABLE T_EB_WEAVEDESCENTITY(
FID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FDESC NCLOB,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME
);
EXEC P_ALTERPK 'PK_EB_WEAVEDESCENTITY', 'T_EB_WEAVEDESCENTITY', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_WEAVEDESCENTITY_TEMP') CREATE INDEX IDX_EB_WEAVEDESCENTITY_TEMP ON T_EB_WEAVEDESCENTITY ( FTEMPLATEID );