22,209
社区成员
发帖
与我相关
我的任务
分享
update t2
set tname=t1.Name
from teacher t1,course t2
where
t1.tid=t2.tid
---------
create trigger tr_course on course
for update
as
if update(tid)
begin
update t1
from
course t1 join teacher t2 on t1.tid=t2.tid
where
exists(select 1 from inserted where tid=t1.tid)
end