首页 > 代码库 > SQL_存储过程return返回值

SQL_存储过程return返回值

--定义存储过程create procedure GetReturnValue@className nvarchar(50),@Age intas begindeclare @maxScore intselect @maxScore=MAX(chinese) from Students where ClassName=@className and Age>@Agereturn @maxScoreenddeclare @returnValue intexec @returnValue = GetReturnValue 高三一班,18select @returnValue as 返回值

 

SQL_存储过程return返回值