--货币基础资料&自动同步配置货币对多选基础资料
/**Begin D:\PDM\PDM1\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_EXRATE_CURRPAIR')
 CREATE TABLE T_BD_EXRATE_CURRPAIR (
FID BIGINT DEFAULT 0 NOT NULL,
FORIGCUR BIGINT DEFAULT 0 NOT NULL,
FTARGETCUR BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(64) DEFAULT ' ' NOT NULL
);


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

 EXEC P_ALTERPK 'PK_T_BD_EXRATE_CURRPAIR', 'T_BD_EXRATE_CURRPAIR', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_EX_PAIR') CREATE INDEX IDX_T_BD_EX_PAIR ON T_BD_EXRATE_CURRPAIR ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_INT_SYNC_CURRPAIR', 'T_INT_SYNC_CURRPAIR', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_INT_SYN_CURPAIR') CREATE INDEX IDX_T_INT_SYN_CURPAIR ON T_INT_SYNC_CURRPAIR ( FENTRYID );


/**End D:\PDM\PDM1\BOS_table.sql **/
