ALTER TRIGGER test_Rate ON dbo.tRate FOR insert AS declare @errno int, @errmsg varchar(255) begin UPDATE dbo.tRate SET vcUpdaterId=Inserted.iAutoId FROM dbo.tRate, inserted WHERE dbo.tRate.iAutoId= inserted .iAutoId end return error: raiserror @errno @errmsg rollback transaction
[SQL]触发器把自增ID的值赋值给另外一个字段
猜你喜欢
转载自www.cnblogs.com/beeone/p/8874838.html
今日推荐
周排行