0
create procedure spGetEmployeByDepartmentIdCount
@DepartmentIdType int ,
@DepartmentIdCount int output
as
Begin
select count(id)
from tblemploye1
where @DepartmentIdType = id
End
Declare @DepartmentIdCount int
Declare @id int
set @id = 1
Execute spGetEmployeByDepartmentIdCount @id, @DepartmentIdCount output
print @DepartmentIdCount
使用函数,它将返回值 –
所以有什么问题? – Sunil
它可以工作,任何问题? –