CREATE TABLE EXCHANGE(
    EX_ID                   NUMERIC(18) NOT NULL DEFAULT nextval('S_EXCHANGE_PK'),
    NAME                    VARCHAR(20) NOT NULL,
    DESCRIPTION             VARCHAR(40),
    COUNTRY                 VARCHAR(40),
    REGION_CG_ID            NUMERIC(18),
    TIMEZONE_UTC_DIFF       NUMERIC(18),
    OPEN_LOCAL              TIME,
    CLOSE_LOCAL             TIME,
    LAST_UPDATE_TM          TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),

     CONSTRAINT IPK_EXCHANGE PRIMARY KEY (EX_ID)
);

ALTER TABLE EXCHANGE ADD CONSTRAINT IFK_CODE_GENERIC FOREIGN KEY (REGION_CG_ID) REFERENCES CODE_GENERIC (CG_ID);
