![]() |
#2
那个梦2007-11-08 09:09
|
create trigger update_teacher6 on teacher
for update
as
if update(prof)
declare @tno_new char(6), @tno_old char(6),
@prof_new char(12), @prof_old char(12)
select @tno_new =tno,@prof_new=prof from inserted
select @tno_old =tno,@prof_old=prof from deleted
if exists(select * from deleted
where @prof_old='讲师')
begin
update teacher
set comm=comm+500
where tno=@tno_old
end
请教啊!!!!
