简单sql问题

  select      ID, CREATE_TIME, MODIFY_TIME, EXPIRATION_TIME,   ORDER_ID_IN3RD_SYS,BATCH_NUMBER,SUB_BATCH_NUMBER,IS_MERCHANT,   PAYER_ID,PAYER_INFO_ID,SOURCE_CURRENCY,SOURCE_AMOUNT,EXCHANGE_RATE,   PAYEE_ID,IS_MERCHANT_PAYEE,PAYEE_INFO_ID,TARGET_CURRENCY,TARGET_AMOUNT,MCC_CODE,STATUS,   PAYMENT_STATUS,IS_PROCESSED     from CB_EXCHANGE_ORDER   where ORDER_ID_IN3RD_SYS = '1000002215' and STATUS='VALID'  



 select      ID, CREATE_TIME, MODIFY_TIME, EXPIRATION_TIME,   ORDER_ID_IN3RD_SYS,BATCH_NUMBER,SUB_BATCH_NUMBER,IS_MERCHANT,   PAYER_ID,PAYER_INFO_ID,SOURCE_CURRENCY,SOURCE_AMOUNT,EXCHANGE_RATE,   PAYEE_ID,IS_MERCHANT_PAYEE,PAYEE_INFO_ID,TARGET_CURRENCY,TARGET_AMOUNT,MCC_CODE,STATUS,   PAYMENT_STATUS,IS_PROCESSED   , SOURCE_ACTUAL_AMOUNT,EXCHANGE_STATUS,IS_MANUAL_REFUND   from CB_EXCHANGE_ORDER   where         ORDER_ID_IN3RD_SYS = ?        and     ID = ?        and     STATUS = ?         
2015-06-09 11:17:09,542 DEBUG [java.sql.PreparedStatement] - {pstm-100016} Parameters: [1100002220, 10049, INVALID]


update   CB_SUB_BATCH_NUMBER CSB   set CSB.MODIFY_TIME = sysdate ,   CSB.TARGET_AMOUNT=(CSB.TARGET_AMOUNT  +  ? ) ,   CSB.SOURCE_AMOUNT=(CSB.SOURCE_AMOUNT +  ? )   where CSB.SUB_BATCH_NUMBER = ?  
2015-06-09 13:44:18,721 DEBUG [java.sql.PreparedStatement] - {pstm-100054} Executing Statement:    update   CB_SUB_BATCH_NUMBER CSB   set CSB.MODIFY_TIME = sysdate ,   CSB.TARGET_AMOUNT=(CSB.TARGET_AMOUNT  +  ? ) ,   CSB.SOURCE_AMOUNT=(CSB.SOURCE_AMOUNT +  ? )   where CSB.SUB_BATCH_NUMBER = ?  
2015-06-09 13:44:18,721 DEBUG [java.sql.PreparedStatement] - {pstm-100054} Parameters: [6218000000, 1000000, 20150609-paypa-dd-GBP-CNY]
2015-06-09 13:44:18,721 DEBUG [java.sql.PreparedStatement] - {pstm-100054} Types: [java.math.BigDecimal, java.math.BigDecimal, java.lang.String]



alter table cb_sub_batch_number  rename column id  to  sub_batch_number
alter table cb_batch_number modify sub_batch_number varchar(64);

alter table cb_payee_info add (  type char(1))
alter table cb_payee_info drop column type
select sysdate  from dual;


欢迎关注公众号:Java后端技术全栈