T-SQL编程(带输出参数的存储过程)

  ( *     = )



 proc_stu



go



 proc_stu

	

	@passnum  ,

	@writtenPass  = 60
	@LabPass  = 60 



			

	

	 


		 stuinfo.stuName,stuinfo.stuNo ,stuMarks.writtenExam,stuMarks.LabExam

		 stuinfo    stuMarks

		 stuMarks.stuNo=stuinfo.stuNo

		 writtenExam<@writtenPass or LabExam<@LabPass



	select @passnum=(stuNo)  stuMarks

	 writtenExam<@writtenPass  LabExam<@LabPass



 @pass   

 proc_stu  @pass  ,100,90





	(@pass>=3)

		

			
		

	

		

			

		
 
参加本次考试没有通过的学员
stuName    stuNo      writtenExam LabExam    
---------- ---------- ----------- ---------- 
张秋丽        s25301     87          82
李斯文        s25303     90          58
李文才        s25302     60          90
(所影响的行数为 3 行)
不及格人数过多



你可能感兴趣的:(SQL,server)