create trigger OrderAds on HR_Ads
for insert
as
begin
declare @OrderId int
select @OrderId=isnull(max(Order_ID),0)+1 from [HR_Ads]
update HR_Ads set Order_ID =@OrderId where Gid=(Select Gid from Inserted)
--select * from inserted
end
文章来源:
http://www.cnblogs.com/wangdetian168/archive/2008/11/28/1343228.html
posted on 2010-10-09 10:57
sanmao 阅读(93)
评论(0) 编辑 收藏