如何实现这样的触发器?
迭戈爱足球 2007-03-14 11:34:29 当b.expiredby<getdate()条件成立时,要进行update merchant_info.这个需要在网站的运行中自动更新.如何写.谢谢
以下是sql语句
update merchant_info
set discount=BookDiscount,
promotionTag=-1,
pDiscountType=BdiscountType
where merchantID in
( select distinct b.merchantID from broadcast_info b where b.expiredby<getdate() )