帮写一个触发器
- SQL code
我有2个表表Auser isin amount 1 0 1 1 0 1 1 1 1 表Buser totalamount 1 1需求是当表A插入值的时候统计一次amount到表B的totalamount条件 1.统计表A.user=B.user 2.当isin=0的时候加,ison=1的时候减最终结果是两张表现在的值。谢谢!
发布时间: 2012-12-16 12:02:32 作者: rapoo
帮写一个触发器
我有2个表表Auser isin amount 1 0 1 1 0 1 1 1 1 表Buser totalamount 1 1需求是当表A插入值的时候统计一次amount到表B的totalamount条件 1.统计表A.user=B.user 2.当isin=0的时候加,ison=1的时候减最终结果是两张表现在的值。谢谢!