⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getallscores.sql

📁 一个别人编写的学生管理系统,开以看下
💻 SQL
字号:
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetAllSocres')
	BEGIN
		DROP  Procedure  GetAllSocres
	END

GO

CREATE Procedure GetAllSocres
/*
	(
		@parameter1 int = 5,
		@parameter2 datatype OUTPUT
	)

*/
AS

SELECT T_Student.StudentName AS 学生姓名, T_Class.ClassName AS 班级, 
      T_Subject.SubjectName AS 科目, T_Score.Score AS 成绩
FROM T_Score INNER JOIN
      T_Student ON T_Score.StudentId = T_Student.StudentId INNER JOIN
      T_Course ON T_Score.CourseId = T_Course.CourseId INNER JOIN
      T_Subject ON T_Course.SubjectId = T_Subject.SubjectId INNER JOIN
      T_Class ON T_Student.ClassId = T_Class.ClassId
WHERE (T_Score.States = 1) AND (T_Student.States = 1) AND (T_Course.States = 1) AND 
      (T_Subject.State = 1) AND (T_Class.States = 1) 
GO

/*
GRANT EXEC ON GetAllSocres TO PUBLIC

GO
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -