遗忘海岸

江湖程序员 -Feiph(LM战士)

导航

一个触发器

ALTER Trigger [trig_ensure_injury]
on [dbo].[Employee_basic_infomation]
After insert
as
Declare @Injury_status nvarchar(50)
Select @injury_status=injury_status from inserted
if @injury_status is null
Begin
  update dbo.Employee_basic_infomation
  Set injury_status='未保'
  From Employee_basic_infomation e inner join Inserted i
  On e.sequence=i.sequence
 
End

posted on 2012-04-12 20:04  遗忘海岸  阅读(216)  评论(0编辑  收藏  举报