IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_TRIPAREA_CITYS')
CREATE TABLE T_ER_TRIPAREA_CITYS (
                                     FPKID BIGINT DEFAULT 0 NOT NULL,
                                     FID BIGINT DEFAULT 0 NOT NULL,
                                     FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);

EXEC p_AlterPK 'PK_T_ER_TRIPAREA_CITYS', 'T_ER_TRIPAREA_CITYS', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_ER_TRIPAREA_CITYS' AND KSQL_INDNAME = 'IDX_TRIPAREACITYS_FID')
 CREATE INDEX IDX_TRIPAREACITYS_FID ON T_ER_TRIPAREA_CITYS (FID );






