create proc score_result
@courseName varchar(20) --参数
as
declare             --定义变量
@courseNo int,        
@testTime1 datetime,
@avg int
begin               --方法开始
select @courseNo=courseNo from course where courseName=@courseName
select @testTime1=max(testTime) from chengji where courseNo=@courseNo;
select @avg=AVG(result) from chengji where courseNo=@courseNo
and testtime=@testTime1
select @avg --打印平均分
select * from student where studentno in (select studentNo from chengji where
courseNo=@courseNo and testTime=@testTime1 and result<60);--打印不及格的学生信息
end;     --方法结束

最新文章

  1. HTML 学习笔记 CSS3(Animation)
  2. Theano2.1.16-基础知识之调试:常见的问题解答
  3. 调用jar程序,读取与jar同级的配置文件。
  4. 防止非授权用户调用DLL
  5. Oracle 唯一主键引发的行锁
  6. Lotus Sametime
  7. 字符集编码与Python(二)Unicode与utf-8
  8. [HNOI2002]营业额统计_Treap
  9. Scapy实现SYN泛洪攻击
  10. c语言实现两个单链表的交叉合并
  11. Ubuntu14.04打开cheese却黑屏的问题
  12. Confluence 6 home 修改 Home 目录的位置
  13. 微商城项目 请求接口封装中出现 callback &amp;&amp; callback() 原理
  14. Django admin 后台管理
  15. sublime的lua插件
  16. 什么时候用深搜(dfs)什么时候用广搜(bfs)(转)
  17. JavaWeb学习路线图
  18. 在html5 canvas的destination-atop属性的一些奇怪的问题
  19. Python3中关于下划线变量和命名的总结
  20. 性能测试loadrunner安装

热门文章

  1. BigDecimal转String
  2. Java高性能编程之CAS与ABA及解决方法
  3. 巨杉Tech | Hbase迁移至SequoiaDB 实战
  4. iOS面试题整理带答案
  5. CentOS7.2防火墙配置
  6. 【教程】Bluestacks0.7.9.860以上版3分钟教你摇一摇
  7. PTA A1011&amp;A1012
  8. Linux配置部署_新手向(四)——Redis安装与配置
  9. 2018年蓝桥杯java b组第五题
  10. 从 Int 到 Integer 对象,细细品来还是有不少东西