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
C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着 |