请帮我写一下这个触发器,万分感谢!
表t1——字段:id, thename
表t2——字段:id,t1id,thename,IsUsing
现希望创建触发器,当删除t1的记录时,希望把t2中t1id等于刚才删除的t1的id的记录的IsUsing改为0,
也就是说:
当:delect t1 where id=5时,希望让触发器:
update t2 set IsUsing = 0 where t1id=5
这触发器:
create trigger theTRIGGER
on t1
for delect
as
接着怎么写啊?谢谢!万分感谢。