IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CTS_NAMECONFIGCOUNTRIES') 
 CREATE TABLE T_CTS_NAMECONFIGCOUNTRIES (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCOUNTRY BIGINT DEFAULT 0 NOT NULL,
FISDEFAULT CHAR(1) DEFAULT '0' NOT NULL
);
EXEC P_ALTERPK 'PK_T_CTS_NAMECONFIGCOUNTRIES', 'T_CTS_NAMECONFIGCOUNTRIES', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CTS_NCC_COUNTRY') CREATE INDEX IDX_CTS_NCC_COUNTRY ON T_CTS_NAMECONFIGCOUNTRIES ( FCOUNTRY );