当前位置:   article > 正文

SQLServer -- 自定义无参数存储过程_sqlserver 存储过程无参数

sqlserver 存储过程无参数

自定义储过程

这里写图片描述

use StuManageDB
go
if exists(Select * from sysobjects where name='usp_ScoreQuery')
drop procedure usp_ScoreQuery
go

create procedure usp_ScoreQuery --创建存储过程
as
    --查询考试信息
    select Students.StudentId,StudentName,ClassName,ScoreSum=(CSharp+SQLServerDB)
    from Students
    inner join StudentClass on Students.ClassId = StudentClass.ClassId
    inner join ScoreList on Students.StudentId = ScoreList.StudentId
    order by ScoreSum DESC

go
ex
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/运维做开发/article/detail/753765
推荐阅读
相关标签
  

闽ICP备14008679号