IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_LANGUAGE_RELATION') 
 CREATE TABLE T_INT_LANGUAGE_RELATION (
FID BIGINT DEFAULT 0 NOT NULL,
FSTANDARDLAN VARCHAR(64) DEFAULT ' ' NOT NULL,
FCUSTOMLAN VARCHAR(64) DEFAULT ' ' NOT NULL
);


 EXEC P_ALTERPK 'PK_T_INT_LANGUAGE_RELATION', 'T_INT_LANGUAGE_RELATION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_INT_LANG_REL') CREATE INDEX IDX_T_INT_LANG_REL ON T_INT_LANGUAGE_RELATION ( FSTANDARDLAN );


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_LANGUAGE' AND KSQL_COL_NAME ='FISSTANDARD') 
 ALTER TABLE T_INT_LANGUAGE ADD (FISSTANDARD CHAR(1) DEFAULT '0' NOT NULL );