求教这样的一个存储过程
我有两个表(A、B),A表有字段要更新的AllCount,Count1,Count2,Count3,AllMoney,B表有Break1,Break2两个字段(两个字段是整型,但可以为空),我的客户端更新A表的AllCount字段,我要的触发器只是捕捉对AllCount的Update操作,用Break1,Break2来更新Count1,Count2,Count3,当Break1为空时:Count1=AllCount,Count2=0,Count3=0当Break2为空时:Count1=AllCount DIV Break1,Count2=AllCount MOD Break2,Count3=0,当Break2不为空时:Count1=AllCount DIV(Break1*Break2);Count2=AllCount MOD(Break1*Break2)DIV Break2;Count3=AllCount MOD(Break1*Break2)MOD Break2),更新完Count1,Count2,Count3时,再更新AllMoney=Price1*Count1+Price2*Count2+Price3*Count3,(price1,Price2,Price3:已经保证不为空值)请教各路高手赐教!最好就是附上具体实现方法!多谢先了!