例如原值字段名为 fee,sql用一条update即可实现,当然关于充值肯定要严密的事务逻辑,这里只给你需求的语句:
update table set fee=fee+50select count(*) from table_a where field_time>='2012-05-01 00:00:00' and field_time<'2012-06-01 00:00:00' and id not in (select id from table_a where field_time<'2012-05-01 00:00:00')欢迎分享,转载请注明来源:内存溢出
评论列表(0条)