
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRIC_ATTACHMENTDATA') 
 CREATE TABLE T_HRIC_ATTACHMENTDATA (
FID BIGINT DEFAULT 0 NOT NULL,
FRELENTITYID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCREATEDATE DATETIME,
FDESCRIPTION VARCHAR(255) DEFAULT ' ' NOT NULL,
FSORT INT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FFILEDATA NCLOB,
FSIZE INT DEFAULT 0 NOT NULL,
FURL VARCHAR(500) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL
);