[计算机软件及应用]第7章 存储过程和触发器.pptVIP

  • 13
  • 0
  • 约1.63万字
  • 约 64页
  • 2018-02-15 发布于浙江
  • 举报

[计算机软件及应用]第7章 存储过程和触发器.ppt

[计算机软件及应用]第7章 存储过程和触发器

Update触发器 create trigger tr_CourseList_Update on select_courselist for update as if @@rowcount=0 return declare @CourseName varchar(50) declare @temp int declare Course_cur cursor for select CourseName from deleted open course_cur fetch next from course_cur into @coursename while @@fetch_status=0 begin update student_count set studentcount=studentcount-1 where coursename=@coursename fetch next from course_cur into @coursename end close course_cur deallocate course_cur Update触发器(续) declare Course_cur1 cursor for select CourseName from inserted open course_cur1 f

文档评论(0)

1亿VIP精品文档

相关文档